mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-05-08 08:13:25 +02:00
add apparmor=rootlesskit in security_opt (#937)
paste depends_on chain from socket-runner-setup to runner-dind-setup add apparmor=rootlesscit in security_opt add explanations for elevated privileges --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <2021+silverwind@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/runner/pulls/937 Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com> Co-authored-by: Schallbert <schallbert@mailbox.org> Co-committed-by: Schallbert <schallbert@mailbox.org>
This commit is contained in:
@@ -40,14 +40,21 @@
|
|||||||
|
|
||||||
### Running `gitea-runner` using Docker-in-Docker (DIND)
|
### Running `gitea-runner` using Docker-in-Docker (DIND)
|
||||||
|
|
||||||
|
- `privileged` has to be set to `true` because in-container Docker daemon requires a lot of kernel capabilities and file system mounts like `procfs` and `sysfs`
|
||||||
|
- `security_opt` sets the `apparmor` profile to `rootlesskit` for hosts running AppArmor (e.g. Ubuntu, Debian), where the kernel might otherwise block user namespace changes that Docker daemon requires for startup. The `rootlesskit` profile is provided by the `docker-ce-rootless-extras` package and is present on hosts where Docker was installed via the official installer or distro packages
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
...
|
...
|
||||||
runner:
|
runner:
|
||||||
image: gitea/runner:latest-dind-rootless
|
image: gitea/runner:latest-dind-rootless
|
||||||
restart: always
|
restart: always
|
||||||
privileged: true
|
privileged: true
|
||||||
|
security_opt:
|
||||||
|
- apparmor=rootlesskit
|
||||||
depends_on:
|
depends_on:
|
||||||
- gitea
|
gitea:
|
||||||
|
condition: service_healthy
|
||||||
|
restart: true
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/runner:/data
|
- ./data/runner:/data
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user