Seems clean
This commit is contained in:
parent
3bf60ffda8
commit
fc34525755
5 changed files with 155 additions and 2 deletions
62
base/Dockerfile
Normal file
62
base/Dockerfile
Normal file
|
@ -0,0 +1,62 @@
|
|||
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"]
|
11
base/git/gitconfig
Normal file
11
base/git/gitconfig
Normal file
|
@ -0,0 +1,11 @@
|
|||
[includeIf "gitdir:/home/x/Projects/xestro/"]
|
||||
path = ~/.config/git/xestro.conf
|
||||
|
||||
[includeIf "gitdir:/home/x/Projects/repobase/"]
|
||||
path = ~/.config/git/repobase.conf
|
||||
|
||||
[includeIf "gitdir:/home/x/Projects/gitlab/"]
|
||||
path = ~/.config/git/gitlab.conf
|
||||
|
||||
[includeIf "gitdir:/home/x/Projects/github/"]
|
||||
path = ~/.config/git/github.conf
|
Loading…
Add table
Add a link
Reference in a new issue