10 Commits
main ... main

Author SHA1 Message Date
03df535d76 feat: add fluxcd to infra container 2025-11-16 14:25:21 +01:00
d6ef16cd24 fix: disable seccomp for vms container 2025-11-12 17:07:51 +01:00
a0ea04d2bd chore: remove kali container 2025-11-12 16:55:15 +01:00
d7468a444b feat: add vms path 2025-11-11 09:01:14 +01:00
f25b6966ef fix: enable gpu for vms container 2025-11-10 19:58:47 +01:00
9f1b65b781 refactor: add spacing to dockerfiles 2025-11-10 17:59:48 +01:00
d81fa7d3a1 feat: add vms devcontainer 2025-11-10 17:57:21 +01:00
7e27784a9a chore: change code path 2025-11-04 16:26:11 +01:00
b5dd280e5a feat: add /mnt flag 2025-10-31 11:57:26 +01:00
bb43c758f9 feat: add -usb and -kvm flags 2025-10-31 11:43:28 +01:00
10 changed files with 38 additions and 56 deletions

View File

@@ -58,3 +58,12 @@ jobs:
tags: git.plabble.org/job79/infra:${{ github.ref_name }} tags: git.plabble.org/job79/infra:${{ github.ref_name }}
build-args: TAG=${{ github.ref_name }} build-args: TAG=${{ github.ref_name }}
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
- name: Build and push vms container
uses: docker/build-push-action@v5
with:
context: ./containers/vms
file: ./containers/vms/Containerfile
push: true
tags: git.plabble.org/job79/vms:${{ github.ref_name }}
build-args: TAG=${{ github.ref_name }}
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true

View File

@@ -1,37 +0,0 @@
name: Build container
on:
push:
branches: ["main"]
paths:
- "containers/kali/**"
- ".gitea/workflows/kali.yaml"
pull_request:
branches: ["main"]
paths:
- "containers/kali/**"
- ".gitea/workflows/kali.yaml"
schedule:
- cron: "0 16 * * FRI"
jobs:
kali-build:
runs-on: job-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- 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 kali container
uses: docker/build-push-action@v5
with:
context: ./containers/kali
file: ./containers/kali/Containerfile
push: true
tags: git.plabble.org/job79/kali:${{ github.ref_name }}
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true

View File

@@ -1,5 +1,7 @@
ARG TAG ARG TAG
FROM git.plabble.org/job79/fedora:${TAG} FROM git.plabble.org/job79/fedora:${TAG}
USER root USER root
RUN dnf -y install go RUN dnf -y install go
USER user USER user

View File

@@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
arg "-v $HOME/Documents/containers/go:/home/user/projects" arg "-v $HOME/Documents/go:/home/user/Documents/go"

View File

@@ -1,6 +1,9 @@
ARG TAG ARG TAG
FROM git.plabble.org/job79/fedora:${TAG} FROM git.plabble.org/job79/fedora:${TAG}
USER root USER root
RUN dnf -y install kubectl openssl RUN dnf -y install kubectl openssl
RUN curl -sL https://talos.dev/install | sh RUN curl -sL https://talos.dev/install | sh
RUN curl -s https://fluxcd.io/install.sh | bash
USER user USER user

View File

@@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
arg "-v $HOME/Documents/containers/infra:/home/user/projects" arg "-v $HOME/Documents/infra:/home/user/Documents/infra"

View File

@@ -1,17 +0,0 @@
FROM docker.io/kalilinux/kali-rolling
# === install system packages ===
RUN apt update && \
apt -y install iputils-ping sudo \
zoxide git npm neovim gawk jq unzip fd-find lazygit
# === setup user ===
RUN useradd -ms /bin/bash user && \
usermod -aG sudo user && sed -i 's/^%sudo\s\+ALL=(ALL:ALL)\s\+ALL$/%sudo\tALL=(ALL:ALL)\tNOPASSWD: ALL/' /etc/sudoers && \
mkdir -p /run/user/1000 && chown user:user /run/user/1000
USER user
WORKDIR /home/user
RUN mkdir -p .config .local .cache
RUN git clone https://git.plabble.org/Job79/neovim-config.git .config/nvim
VOLUME /home/user

View File

@@ -0,0 +1,7 @@
ARG TAG
FROM git.plabble.org/job79/fedora:${TAG}
USER root
RUN dnf -y install qemu-system-x86
USER user

6
containers/vms/config.sh Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
arg "-v $HOME/Documents/vms:/home/user/Documents/vms"
arg "--net host"
arg "--device /dev/kvm"
arg "--device /dev/dri"
arg "--security-opt seccomp=unconfined"

View File

@@ -49,6 +49,10 @@ param_args() {
case "$1" in case "$1" in
-gpu) # Enable gpu acceleration. -gpu) # Enable gpu acceleration.
arg "--device /dev/dri" ;; arg "--device /dev/dri" ;;
-kvm) # Enable KVM.
arg "--device /dev/kvm" ;;
-usb) # Enable USB access.
arg "--device /dev/bus/usb" ;;
-host-spawn) # Enable spawning host commands from inside the container using host-spawn. -host-spawn) # Enable spawning host commands from inside the container using host-spawn.
arg "-v /run/user/$UID/bus:/tmp/bus" arg "-v /run/user/$UID/bus:/tmp/bus"
arg "-e HOST_HOME=$HOME" # Used to translate paths. arg "-e HOST_HOME=$HOME" # Used to translate paths.
@@ -59,6 +63,11 @@ param_args() {
arg "-e DISPLAY=$DISPLAY" arg "-e DISPLAY=$DISPLAY"
arg "-e XAUTHORITY=/run/user/1000/.Xauthority" arg "-e XAUTHORITY=/run/user/1000/.Xauthority"
;; ;;
-mnt) # Mount directory.
shift
arg "-w /mnt/"
arg "-v $1:/mnt/$([ ! -d "$1" ] && echo 'file')"
;;
*) # Use unknown arguments a podman arguments. *) # Use unknown arguments a podman arguments.
arg "$1" ;; arg "$1" ;;
esac esac