-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
68 lines (63 loc) · 1.74 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
FROM node:lts-alpine
MAINTAINER Andrey Paskal <[email protected]>
ENV USER node
ENV USER_HOME /home/${USER}
RUN \
apk add --update --no-cache \
bash \
bash-completion \
bat \
ca-certificates \
curl \
fzf \
gcc g++ \
git \
grep \
gzip \
jq \
less \
make \
ncurses-terminfo-base \
neovim \
nodejs-current \
npm \
openssh \
the_silver_searcher \
tmux \
tree \
unzip \
util-linux \
yarn
# Install neovim config
RUN git clone https://github.com/app/nvim.lua.git ${USER_HOME}/.config/nvim
# Install neovim plugin manager 'vim-plug'
RUN sh -c 'curl -fLo "${XDG_DATA_HOME:-${USER_HOME}/.local/share}"/nvim/site/autoload/plug.vim \
--create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# Update files ownership
RUN chown -R ${USER}:${USER} ${USER_HOME}
# System-wide install executables required by neovim plugins
RUN npm -g install \
create-react-app \
prettier \
typescript-language-server \
typescript \
diagnostic-languageserver \
eslint
SHELL ["/bin/bash", "-c"]
USER ${USER}
WORKDIR ${USER_HOME}
# Install neovim plugins with vim-plug manager command PlugInstall
RUN nvim --headless +PlugInstall +qall 2> ${USER_HOME}/condev.log
COPY --chown=$USER:$USER start.sh ${USER_HOME}
COPY --chown=$USER:$USER .gitconfig ${USER_HOME}
COPY --chown=$USER:$USER .bash_prompt ${USER_HOME}
COPY --chown=$USER:$USER .bash_profile ${USER_HOME}
COPY --chown=$USER:$USER .bash_git ${USER_HOME}
COPY --chown=$USER:$USER .tmux.conf ${USER_HOME}
COPY --chown=$USER:$USER .tmux_statusline ${USER_HOME}
COPY --chown=$USER:$USER .bash_locale ${USER_HOME}
COPY --chown=$USER:$USER .bashrc ${USER_HOME}
USER root
# Add 'vim' command alias
RUN ln -s /usr/bin/nvim /usr/bin/vim
ENTRYPOINT ["/home/node/start.sh"]