diff --git a/installation/podman.sh b/installation/podman.sh index c14f98d..0313ea9 100644 --- a/installation/podman.sh +++ b/installation/podman.sh @@ -36,5 +36,8 @@ echo "net.ipv4.ip_unprivileged_port_start=53" >> /etc/sysctl.d/podman.conf sysctl -p /etc/sysctl.d/podman.conf # Enable and start Podman socket +echo 'podman_user="podman"' >> /etc/rc.conf + rc-update add podman -rc-service podman start \ No newline at end of file +rc-service podman start +chmod 666 /run/podman/podman.sock \ No newline at end of file diff --git a/services/gitea/gitea-runner.service.toml b/services/gitea/gitea-runner.service.toml index a63c070..589c3d0 100644 --- a/services/gitea/gitea-runner.service.toml +++ b/services/gitea/gitea-runner.service.toml @@ -1,4 +1,5 @@ user = "podman" +capabilities = ["DAC_OVERRIDE"] [service] name = "gitea-runner" @@ -20,8 +21,11 @@ target = "/config" [[mounts]] typ = "bind" -source = "/run/podman/podman.sock" +source = "/tmp/storage-run-$(id -u)/podman/podman.sock" target = "/var/run/docker.sock" +[[networks]] +name = "gitea-net" + [[networks]] name = "gitea-net" \ No newline at end of file diff --git a/services/gitea/runner-config.yaml b/services/gitea/runner-config.yaml index e3ee4f9..32effc1 100644 --- a/services/gitea/runner-config.yaml +++ b/services/gitea/runner-config.yaml @@ -69,7 +69,7 @@ container: # Specifies the network to which the container will connect. # Could be host, bridge or the name of a custom network. # If it's empty, act_runner will create a network automatically. - network: "" + network: "gitea-net" # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker). privileged: false # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).