From 4c3528817525860ae84c8a5eda19eaced31c58cb Mon Sep 17 00:00:00 2001 From: vilunov Date: Mon, 2 Oct 2023 15:12:31 +0000 Subject: [PATCH] Add DIND docker-compose example (#365) Co-authored-by: Nikita Vilunov Reviewed-on: https://gitea.com/gitea/act_runner/pulls/365 Reviewed-by: Lunny Xiao Co-authored-by: vilunov Co-committed-by: vilunov --- examples/docker-compose/README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/examples/docker-compose/README.md b/examples/docker-compose/README.md index 9267111..c696606 100644 --- a/examples/docker-compose/README.md +++ b/examples/docker-compose/README.md @@ -18,6 +18,29 @@ - GITEA_INSTANCE_URL= # When using Docker Secrets, it's also possible to use # GITEA_RUNNER_REGISTRATION_TOKEN_FILE to pass the location. - # The env var takes precedence + # The env var takes precedence. + # Needed only for the first start. + - GITEA_RUNNER_REGISTRATION_TOKEN= +``` + +### Running `act_runner` using Docker-in-Docker (DIND) + +```yml +... + runner: + image: gitea/act_runner:latest-dind-rootless + restart: always + privileged: true + depends_on: + - gitea + volumes: + - ./data/act_runner:/data + environment: + - GITEA_INSTANCE_URL= + - DOCKER_HOST=unix:///var/run/user/1000/docker.sock + # When using Docker Secrets, it's also possible to use + # GITEA_RUNNER_REGISTRATION_TOKEN_FILE to pass the location. + # The env var takes precedence. + # Needed only for the first start. - GITEA_RUNNER_REGISTRATION_TOKEN= ```