FROM archlinux:latest # Update RUN pacman -Syu --noconfirm ## Configure non-root user RUN pacman -S --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 -S --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 -S --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 RUN yay -S --noconfirm terraform-ls RUN mkdir -p /home/x/.config/ COPY ./nvim /home/x/.config/nvim # Should run Lazy update and keep the base image reasonably up to date # Just to avoid lengthy startups but we'll see how this approach goes. RUN nvim --headless "+Lazy! update" +qa # Install Tmux RUN sudo pacman -S --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 -S --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 -S --noconfirm opentofu ## AWS CLI RUN yay -S --noconfirm aws-cli-v2 ## Quick drop password at end of build output RUN echo "Your password: $PASS" ENTRYPOINT ["/bin/bash"]