-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
68 lines (60 loc) · 1.6 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
ARG ARCH
FROM ${ARCH}debian:stable-slim
SHELL ["/bin/bash", "-c"]
ARG TARGETOS
ARG TARGETARCH
ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Update system and install core packages/dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
apt-transport-https \
autoconf \
automake \
ca-certificates \
cmake \
coreutils \
curl \
doxygen \
fd-find \
fzf \
g++ \
gettext \
git \
gnupg \
libtool \
libtool-bin \
locales \
make \
npm \
pkg-config \
python3-pip \
ripgrep \
sudo \
tar \
unzip \
wget \
zip \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s "$(which fdfind)" /usr/bin/fd \
&& ln -s "$(which python3)" /usr/bin/python \
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales
# Add user 'nvim' and allow passwordless sudo
RUN adduser --disabled-password --gecos '' nvim \
&& adduser nvim sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER nvim
WORKDIR /home/nvim
ENV HOME /home/nvim
ENV PATH=$PATH:/usr/local/bin/go/bin/:/home/nvim/.local/bin:/home/nvim/.local/bin/bin:/home/nvim/go/bin:/home/nvim/.cargo/bin
ENV GOPATH=/home/nvim/.local/share/go
ENV PATH=$PATH:$GOPATH/bin
ENV NVIM_APPNAME="nvim-Lazyman"
# Copy Neovim config into the image
RUN mkdir -p $HOME/.config/nvim-Lazyman
COPY --chown=nvim:nvim . $HOME/.config/nvim-Lazyman
# Initialize Neovim config and install plugins with Lazy
RUN chmod +x $HOME/.config/nvim-Lazyman/lazyman.sh \
&& $HOME/.config/nvim-Lazyman/lazyman.sh -y -z || true
ENTRYPOINT ["NVIM_APPNAME=nvim-Lazyman", "/bin/bash", "-c", "nvim"]