-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (30 loc) · 1.3 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
FROM ubuntu:20.04
LABEL org.opencontainers.image.source https://github.com/RCristiano/Vim-aS-Code
ARG DEBIAN_FRONTEND=noninteractive
ARG LANG=${LANG:-"en_US.UTF-8"}
ARG LANGUAGE=${LANGUAGE:-"en_US:en"}
ARG UNAME=Ahab
ARG USER_ID=1001
ARG GROUP_ID=1001
RUN apt-get update && \
apt-get -yq install git curl nodejs neovim gnupg2 universal-ctags locales fonts-powerline python3-pip && \
locale-gen ${LANG} && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get install -yq --no-install-recommends yarn && \
pip3 install -U pip pynvim && \
rm -rf /var/lib/apt/lists/* && \
groupadd -g $GROUP_ID -o $UNAME && \
useradd -m -u $USER_ID -g $GROUP_ID -o -s /bin/bash $UNAME
ENV LANG ${LANG}
ENV LANGUAGE ${LANGUAGE}
ENV LC_ALL ${LANG}
USER $UNAME
RUN sh -c 'curl -sLo /home/"${UNAME}"/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' && \
mkdir -p /home/${UNAME}/.config/nvim/
COPY --chown=${USER_ID}:${GROUP_ID} . /home/${UNAME}/.config/nvim/
RUN /usr/bin/nvim +'PlugInstall --sync' +qa &> /dev/null
WORKDIR /mnt/workdir
ENTRYPOINT [ "/usr/bin/nvim" ]
CMD [ "/mnt/workdir" ]