Compare commits

...

2 Commits

Author SHA1 Message Date
26af34f54d
ci: add container build 2024-09-28 18:00:00 +02:00
54865b536a
feat: make container updates easier 2024-09-28 17:56:33 +02:00
5 changed files with 52 additions and 4 deletions

28
.gitea/workflows/ci.yaml Normal file
View File

@ -0,0 +1,28 @@
name: Container build
on: [ push ]
jobs:
container-build:
runs-on: ubuntu-latest
if: gitea.ref == 'refs/heads/main'
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Set up BuildX
uses: docker/setup-buildx-action@v2
with:
endpoint: 'unix:///var/run/docker.sock'
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: git.plabble.org
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Containerfile
push: true
tags: |
git.plabble.org/job79/dev:latest

View File

@ -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"]

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
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