-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (32 loc) · 1 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
FROM debian:sid-slim
LABEL maintainer="Ronan Lanore <[email protected]>"
ENV USER_ID 2000
ENV USER_NAME nvim
ENV USER_DIR /home/nvim
COPY ./nvim-linux64.tar.gz /tmp/
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y bash-completion \
python3-pip \
nodejs \
sqlite3 \
libsqlite3-dev \
git \
jq \
procps \
curl \
sudo \
&& echo 'nvim ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& adduser --uid ${USER_ID} --disabled-password --gecos "Nvim user" ${USER_NAME} \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
USER ${USER_NAME}
WORKDIR ${USER_DIR}
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \
&& eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
&& echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >>~/.profile \
&& brew install neovim
USER root
RUN sed -e '/^nvim.*/d' /etc/sudoers
USER ${USER_NAME}
CMD ["/bin/bash"]