Forgejo Runner configurations, running with root-less Podman
quadlets | ||
.gitignore | ||
README.md |
Forgejo Runner Quadlets
My configurations for running a Forgejo Runner with root-less Podman Quadlets. This configuration enables Actions to build container images using buildah
.
Set-up
Install podman:
sudo apt install podman
Clone this repository:
git clone https://git.poire.dev/aramperes/forgejo-runner-quadlet.git
Create the directory for the quadlets. SystemD will be looking for the quadlets here, and we can use symbolic links to keep them in sync with this repo.
mkdir -p $HOME/.config/containers/systemd
for f in forgejo-runner-quadlet/quadlets/*; do ln -s $(realpath $f) $HOME/.config/containers/systemd/$(basename $f); done
Confirm:
ls -l $HOME/.config/containers/systemd/
# forgejo-runner.container -> /home/user/forgejo-runner-quadlet/quadlets/forgejo-runner.container
# podman-runtime.container -> /home/user/forgejo-runner-quadlet/quadlets/podman-runtime.container
# runner.network -> /home/user/forgejo-runner-quadlet/quadlets/runner.network
Run SystemD generator dry-run to validate the quadlets:
/usr/lib/systemd/system-generators/podman-system-generator --user --dryrun && echo 'Validated!'
Reload SystemD daemon and start the Runner. This will automatically create the Podman Runtime container and the bridge network.
systemctl --user daemon-reload
systemctl --user start forgejo-runner.service
Confirm the containers are running:
podman ps
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# f060983acae5 quay.io/podman/stable:latest podman system ser... 38 seconds ago Up 38 seconds systemd-podman-runtime
# 0bd5990960eb data.forgejo.org/forgejo/runner:9 /bin/sh -c sleep ... 37 seconds ago Up 37 seconds systemd-forgejo-runner