-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
72 lines (58 loc) · 2.93 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM ls12styler/dind:20.10.8
# Install basics (HAVE to install bash for tpm to work)
RUN apk update && apk add -U --no-cache \
bash zsh git git-perl neovim less curl bind-tools \
man-pages build-base su-exec shadow openssh-client sed coreutils
# Set Timezone
RUN apk add tzdata && \
cp /usr/share/zoneinfo/Europe/London /etc/localtime && \
echo "Europe/London" > /etc/timezone && \
apk del tzdata
ENV HOME /home/me
# Install tmux
COPY --from=ls12styler/tmux:3.1b /usr/local/bin/tmux /usr/local/bin/tmux
# Install jQ!
RUN wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O /bin/jq && chmod +x /bin/jq
# Configure text editor - vim!
RUN curl -fLo ${HOME}/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Consult the vimrc file to see what's installed
COPY vimrc ${HOME}/.config/nvim/init.vim
# Clone the git repos of Vim plugins
WORKDIR ${HOME}/.config/nvim/plugged/
RUN git clone --depth=1 https://github.com/ctrlpvim/ctrlp.vim && \
git clone --depth=1 https://github.com/tpope/vim-fugitive && \
git clone --depth=1 https://github.com/godlygeek/tabular && \
git clone --depth=1 https://github.com/plasticboy/vim-markdown && \
git clone --depth=1 https://github.com/vim-airline/vim-airline && \
git clone --depth=1 https://github.com/vim-airline/vim-airline-themes && \
git clone --depth=1 https://github.com/vim-syntastic/syntastic && \
git clone --depth=1 https://github.com/frazrepo/vim-rainbow && \
git clone --depth=1 https://github.com/airblade/vim-gitgutter && \
git clone --depth=1 https://github.com/derekwyatt/vim-scala && \
git clone --depth=1 https://github.com/hashivim/vim-terraform.git && \
git clone --depth=1 https://github.com/ekalinin/Dockerfile.vim.git && \
git clone --depth=1 https://github.com/junegunn/seoul256.vim
# In the entrypoint, we'll create a user called `me`
WORKDIR ${HOME}
# Setup my $SHELL
ENV SHELL /bin/zsh
# Install oh-my-zsh
RUN wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O - | zsh || true
RUN wget https://gist.githubusercontent.com/xfanwu/18fd7c24360c68bab884/raw/f09340ac2b0ca790b6059695de0873da8ca0c5e5/xxf.zsh-theme -O ${HOME}/.oh-my-zsh/custom/themes/xxf.zsh-theme
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${HOME}/.oh-my-zsh/plugins/zsh-autosuggestions
# Copy ZSh config
COPY zshrc ${HOME}/.zshrc
# Install TMUX
COPY tmux.conf ${HOME}/.tmux.conf
RUN git clone https://github.com/tmux-plugins/tpm ${HOME}/.tmux/plugins/tpm && \
${HOME}/.tmux/plugins/tpm/bin/install_plugins
# Copy git config over
COPY gitconfig ${HOME}/.gitconfig
# Entrypoint script creates a user called `me` and `chown`s everything
COPY entrypoint.sh /bin/entrypoint.sh
# Copy over the useful scripts
COPY scripts/* /usr/local/bin/
# Set working directory to /workspace
WORKDIR /workspace
# Default entrypoint, can be overridden
CMD ["/bin/entrypoint.sh"]