-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
37 lines (33 loc) · 1.42 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
# This is the build container image
FROM archlinux/archlinux:latest
ARG version=neovim
COPY . /root/.config/nvim/
RUN pacman -Sy \
&& pacman -S --needed --noconfirm sudo base-devel
RUN useradd builduser -m \
&& passwd -d builduser \
&& printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN pacman -S --needed --noconfirm git lolcat bat nodejs npm python python-pip rustup lua go luarocks ripgrep
RUN sudo -u builduser bash -c 'cd ~ && git clone https://aur.archlinux.org/yay-git.git && cd yay-git && makepkg -si --noconfirm' \
&& rm -rf yay-git \
&& pacman -Sc \
&& rustup install nightly \
&& echo 'PATH+=":$HOME/.local/bin"' >> /root/.bashrc \
&& echo 'PATH+=":$HOME/.cargo/bin"' >> /root/.bashrc \
&& echo 'PATH+=":$HOME/go/bin"' >> /root/.bashrc \
&& echo 'PATH+=":$HOME/.local/lib/python3.9/site-packages"' >> /root/.bashrc \
&& echo 'PATH+=":$HOME/root/.luarocks/bin"' >> /root/.bashrc \
&& echo 'export npm_config_prefix="$HOME/.local"' >> /root/.bashrc \
&& npm set prefix="$HOME/.local"
RUN sudo -u builduser yay -S --noconfirm ${version}
RUN /root/.config/nvim/packages.py --sudo builduser --debug
RUN nvim --headless\
+'autocmd User LazyInstall sleep 100m | qall'
RUN nvim --headless\
+'autocmd User LazySync sleep 100m | qall'\
+"Lazy sync"
# Avoid container exit.
WORKDIR /mnt/workspace
EXPOSE 5555
ENTRYPOINT ["/bin/bash", "-c", "source /root/.bashrc && /bin/nvim"]
CMD ["tail", "-f", "/dev/null"]