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

docs: user: actions: explain options for containers

This commit is contained in:
Earl Warren 2023-07-13 18:53:19 +02:00 committed by Caesar Schinas
parent 3871009d84
commit 4bba8061f5
No known key found for this signature in database
GPG key ID: AE9108461BEA5ACF

View file

@ -267,7 +267,7 @@ The list of available `labels` for a given repository can be seen in the `/{owne
![actions results](../../../../images/v1.20/user/actions/list-of-runners.png)
#### Container
#### container
By default the `docker` label will create a container from a [Node.js 16 Debian GNU/Linux bullseye image](https://hub.docker.com/_/node/tags?name=16-bullseye) and will run each `step` as root. Since an application container is used, the jobs will inherit the limitations imposed by the engine (Docker for instance). In particular they will not be able to run or install software that depends on `systemd`.
@ -279,6 +279,12 @@ container:
image: alpine:3.18
```
#### options
A string of additional options, as documented [docker run](https://docs.docker.com/engine/reference/commandline/run/). For instance: "--workdir /myworkdir --ulimit nofile=1024:1024".
> **NOTE:** the `--volume` option is restricted to a whitelist of volumes configured in the runner executing the task. See the [Forgejo Actions administrator guide](../../admin/actions) for more information.
#### LXC
The `runs-on: self-hosted` label will run the jobs in a [LXC](https://linuxcontainers.org/lxc/) container where software that rely on `systemd` can be installed. Nested containers can also be created recursively (see [the setup-forgejo integration tests](https://code.forgejo.org/actions/setup-forgejo/src/branch/main/.forgejo/workflows/integration.yml) for an example).