forked from kaplanelad/shellfirm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (15 loc) · 858 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu:20.04
RUN apt-get update && apt-get upgrade -y && apt install curl jq xz-utils vim -y
RUN apt-get install -y zsh
RUN usermod -s $(which zsh) root
RUN mkdir ~/.config
# Download shellfirm pre-exec function
RUN curl https://raw.githubusercontent.com/kaplanelad/shellfirm/main/shell-plugins/shellfirm.plugin.sh -o /root/.shellfirm-plugin.sh
# doenload shellfirm
RUN curl https://api.github.com/repos/kaplanelad/shellfirm/releases/latest | jq -r .tag_name | { read version; curl -L https://github.com/kaplanelad/shellfirm/releases/download/${version}/shellfirm-${version}-x86_64-linux.tar.xz -o /tmp/shellfirm.tar.xz; } && \
cd /tmp && \
tar xf shellfirm.tar.xz && \
cd $(ls -d */|head -n 1) && \
cp shellfirm /usr/local/bin
# Load pre-exec command on shell initialized
RUN echo 'source /root/.shellfirm-plugin.sh' >> ~/.zshrc