0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-11-21 17:36:59 -05:00

Add guidance for using podman with the runner

This commit is contained in:
chrysn 2023-07-21 10:08:25 +00:00 committed by Caesar Schinas
parent 0038bd1de9
commit 5528363904
No known key found for this signature in database
GPG key ID: AE9108461BEA5ACF

View file

@ -60,6 +60,22 @@ Good signature from "Forgejo <contact@forgejo.org>"
For jobs to run in containers, the `Forgejo runner` needs access to [Docker](https://docs.docker.com/engine/install/).
### Podman
While Podman is generally compatible to Docker,
it does not run socket for managing containers by default
(because it doesn't usually need one).
If the Forgejo runner complains about "daemon Docker Engine socket not found", or "cannot ping the docker daemon",
you can use podman to provide a Docker compatible socket from an unprivileged user
and pass that socket on to the runner,
e.g. by executing:
```shell
$ podman system service -t 0 &
$ DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock ./forgejo-runner daemon
```
### LXC
For jobs to run in LXC containers, the `Forgejo runner` needs passwordless sudo access for all `lxc-*` commands on a Debian GNU/Linux `bookworm` system where [LXC](https://linuxcontainers.org/lxc/) is installed. The [LXC helpers](https://code.forgejo.org/forgejo/lxc-helpers/) can be used as follows to create a suitable container: