/
Dockerfile-alpine
62 lines (49 loc) · 1.58 KB
/
Dockerfile-alpine
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
FROM 192.168.1.240:5000/alpine
# Enable Testing Repository
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
WORKDIR ~/
RUN apk update && apk add -U --no-cache \
git curl zsh \
tmux bash ncurses openssh-client \
python3 py3-pip nvm \
neovim bat fzf ripgrep
RUN nvm install --lts
# Fetch Oh My Zsh
RUN curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | zsh || true
# Fetch VimPlug
RUN curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Copy config files
COPY .zshrc .zshrc
COPY .aliases .oh-my-zsh/custom/.aliases
COPY init.vim .config/nvim/init.vim
COPY coc-settings.json .config/nvim/coc-settings.json
COPY .tmux.conf .tmux.conf
# Install Neovim Plugins
RUN nvim +PlugInstall +qall >> /dev/null
RUN nvim +CocInstall \
coc-angular \
coc-css \
coc-emmet \
coc-eslint \
coc-git \
coc-html \
coc-json \
coc-markdownlint \
coc-prettier \
coc-python \
coc-snippets \
coc-stylelint \
coc-tsserver >> /dev/null
# Install Tmux Plugin Manager
RUN git clone https://github.com/tmux-plugins/tpm .tmux/plugins/tpm
# Install plugins
RUN .tmux/plugins/tpm/bin/install_plugins
# Create a user called 'me'
RUN useradd -ms /bin/zsh me
# Do everything from now in that users home directory
WORKDIR /home/me
ENV HOME /home/me
# Entrypoint script does switches u/g ID's and `chown`s everything
COPY entrypoint.sh /bin/entrypoint.sh
# Default entrypoint, can be overridden
CMD ["/bin/entrypoint.sh"]