From 54865b536a07d8734268d977ea7565ff865027c8 Mon Sep 17 00:00:00 2001 From: Job79 Date: Sat, 28 Sep 2024 17:56:33 +0200 Subject: [PATCH] feat: make container updates easier --- Containerfile | 9 +++++++-- build.sh | 2 ++ config/nvim/lazyvim.json | 10 ++++++++++ container.sh => enter.sh | 7 +++++-- 4 files changed, 24 insertions(+), 4 deletions(-) create mode 100755 build.sh create mode 100644 config/nvim/lazyvim.json rename container.sh => enter.sh (63%) diff --git a/Containerfile b/Containerfile index fd78003..d39fda3 100644 --- a/Containerfile +++ b/Containerfile @@ -1,7 +1,6 @@ FROM docker.io/fedora:41 # === setup system === -ENV TZ="Europe/Amsterdam" RUN dnf -y install neovim unzip \ bash-completion zoxide fd-find procps \ git go npm @@ -15,4 +14,10 @@ COPY config/user/bashrc /home/user/.bashrc # === setup neovim === 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/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"] diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..4944990 --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +podman build . -t dev diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json new file mode 100644 index 0000000..5965704 --- /dev/null +++ b/config/nvim/lazyvim.json @@ -0,0 +1,10 @@ +{ + "extras": [ + "lazyvim.plugins.extras.coding.copilot", + "lazyvim.plugins.extras.dap.core" + ], + "news": { + "NEWS.md": "6520" + }, + "version": 6 +} \ No newline at end of file diff --git a/container.sh b/enter.sh similarity index 63% rename from container.sh rename to enter.sh index b9f7161..e8e5862 100755 --- a/container.sh +++ b/enter.sh @@ -1,12 +1,15 @@ #!/bin/sh - +name="${1:-dev}" +podman container rm -f -t 1 "$name" podman run -it \ - --name "${1:-dev}" \ + --name "$name" \ -v /run/user/1000/wayland-0:/run/user/1000/wayland-0 \ -v "$SSH_AUTH_SOCK":/run/user/1000/ssh-auth-sock \ -v ~/Documents:/home/user/Documents \ -v ~/.ssh:/home/user/.ssh \ -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 \ --userns=keep-id \ dev