Add lazyvim

This commit is contained in:
jacob.b 2025-08-01 11:40:35 +10:00
parent fc34525755
commit d0f343763d

62
lazyvim/Dockerfile Normal file
View file

@ -0,0 +1,62 @@
FROM archlinux:latest
# Update
RUN pacman -Syu --noconfirm
## Configure non-root user
RUN pacman -Syu --noconfirm sudo
RUN useradd -m -s /bin/bash -G wheel x
RUN PASS=$(openssl rand -base64 14) && echo "x:$PASS" | chpasswd && echo "Pass $PASS"
RUN echo 'x ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER x
WORKDIR /home/x
## Install Yay incase we need it
RUN sudo pacman -Syu --noconfirm git base-devel
RUN git clone https://aur.archlinux.org/yay.git \
&& cd yay \
&& makepkg -si --noconfirm \
&& cd .. && rm -rf yay \
&& yay -Syu
## Install Neovim
RUN sudo pacman -Syu --needed --noconfirm \
neovim git curl unzip tar wget \
nodejs npm \
python python-pip \
lua \
go \
ripgrep \
fd \
gcc make base-devel \
xclip xsel wl-clipboard \
lazygit \
man-db man-pages
RUN yay -Syu --noconfirm terraform-ls
RUN mkdir -p /home/x/.config/
RUN git clone https://github.com/LazyVim/starter ~/.config/nvim
RUN rm -rf ~/.config/nvim/.git
RUN nvim --headless +qa
# Install Tmux
RUN sudo pacman -Syu --noconfirm tmux
#COPY tmux/tmux.conf /home/x/.tmux.conf
## Git
# Should already be installed for Yay but repeating stuff to keep everything in blocks
RUN sudo pacman -Syu --noconfirm git
RUN mkdir -p /home/x/.config/git
#COPY git/gitconfig /home/x/.gitconfig
#COPY git/confs/ /home/x/.config/git/
## Tofu
# Might run into version issues because AUR isn't a versioned repo.
RUN yay -Syu --noconfirm opentofu
## AWS CLI
RUN yay -Syu --noconfirm aws-cli-v2
## Quick drop password at end of build output
RUN echo "Your password: $PASS"
ENTRYPOINT ["/bin/bash"]