From 80180a4b2a118e67f6335b05ebb510298733f951 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Thu, 28 Nov 2024 09:22:56 +0000 Subject: [PATCH] Forgejo runner require libvirt capabilities for LXC --- lxc.md | 14 ++++++++++++++ runner-lxc.md | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lxc.md b/lxc.md index a8abe24..7e108dd 100644 --- a/lxc.md +++ b/lxc.md @@ -60,6 +60,20 @@ lxc-helpers.sh lxc_install_lxc $name $ipv4 $ipv6 lxc-helpers.sh lxc_container_user_install $name $(id -u) $USER ``` +### Docker, LXC and libvirt + +```sh +name=forgejo-host +ipv4=10.85.12 +ipv6=fc33 +lxc-helpers.sh lxc_container_create --config "docker lxc libvirt" $name +echo "lxc.start.auto = 1" | sudo tee -a /var/lib/lxc/$name/config +lxc-helpers.sh lxc_container_start $name +lxc-helpers.sh lxc_install_docker $name +lxc-helpers.sh lxc_install_lxc $name $ipv4 $ipv6 +lxc-helpers.sh lxc_container_user_install $name $(id -u) $USER +``` + ## Hetzner All hardware machines are running Debian GNU/linux bookworm. They are LXC hosts diff --git a/runner-lxc.md b/runner-lxc.md index 8e876d6..2d14feb 100644 --- a/runner-lxc.md +++ b/runner-lxc.md @@ -3,7 +3,7 @@ The LXC container in which the runner is installed must have capabilities that support the backend. - docker:// needs a Docker enabled container -- lxc:// needs a Docker and LXC enabled container +- lxc:// needs a Docker, LXC and libvirt enabled container The runners it contains are not started at boot, it must be done manually. The bash history has the command line to do so.