feat: make container updates easier

This commit is contained in:
Job 2024-09-28 17:56:33 +02:00
parent 7a63471603
commit 54865b536a
Signed by: Job79
SSH Key Fingerprint: SHA256:BezbKv3jZaqu7SdNrZM0e42b8nlNwh63zaVj/pUxc7U
4 changed files with 24 additions and 4 deletions

View File

@ -1,7 +1,6 @@
FROM docker.io/fedora:41 FROM docker.io/fedora:41
# === setup system === # === setup system ===
ENV TZ="Europe/Amsterdam"
RUN dnf -y install neovim unzip \ RUN dnf -y install neovim unzip \
bash-completion zoxide fd-find procps \ bash-completion zoxide fd-find procps \
git go npm git go npm
@ -15,4 +14,10 @@ COPY config/user/bashrc /home/user/.bashrc
# === setup neovim === # === setup neovim ===
RUN git clone --depth 1 https://github.com/LazyVim/starter ~/.config/nvim RUN git clone --depth 1 https://github.com/LazyVim/starter ~/.config/nvim
COPY config/nvim/plugins /home/user/.config/nvim/lua/plugins COPY config/nvim/plugins /home/user/.config/nvim/lua/plugins
COPY config/nvim/config/options.lua /home/user/.config/nvim/config/lua/options.lua COPY config/nvim/config/options.lua /home/user/.config/nvim/lua/config/options.lua
COPY config/nvim/lazyvim.json /home/user/.config/nvim/lazyvim.json
# === setup container ===
ENV TZ="Europe/Amsterdam"
VOLUME /home/user/.local
CMD ["bash"]

2
build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
podman build . -t dev

10
config/nvim/lazyvim.json Normal file
View File

@ -0,0 +1,10 @@
{
"extras": [
"lazyvim.plugins.extras.coding.copilot",
"lazyvim.plugins.extras.dap.core"
],
"news": {
"NEWS.md": "6520"
},
"version": 6
}

View File

@ -1,12 +1,15 @@
#!/bin/sh #!/bin/sh
name="${1:-dev}"
podman container rm -f -t 1 "$name"
podman run -it \ podman run -it \
--name "${1:-dev}" \ --name "$name" \
-v /run/user/1000/wayland-0:/run/user/1000/wayland-0 \ -v /run/user/1000/wayland-0:/run/user/1000/wayland-0 \
-v "$SSH_AUTH_SOCK":/run/user/1000/ssh-auth-sock \ -v "$SSH_AUTH_SOCK":/run/user/1000/ssh-auth-sock \
-v ~/Documents:/home/user/Documents \ -v ~/Documents:/home/user/Documents \
-v ~/.ssh:/home/user/.ssh \ -v ~/.ssh:/home/user/.ssh \
-v ~/.config/git:/home/user/.config/git \ -v ~/.config/git:/home/user/.config/git \
-v ~/.config/github-copilot:/home/user/.config/github-copilot \
-v "$name"-local:/home/user/.local \
--security-opt label=disable \ --security-opt label=disable \
--userns=keep-id \ --userns=keep-id \
dev dev