services: runner: image: code.forgejo.org/forgejo/runner:6 container_name: forgejo-runner restart: unless-stopped # Running as root so (1) apk can install nodejs + docker-cli at # startup (needed by host-mode jobs that execute JS actions and by # `iso/build.sh` which shells out to `docker run`), and (2) access # to the host docker socket doesn't require group juggling. user: "0:0" environment: - DOCKER_HOST=unix:///var/run/docker.sock - CONFIG_FILE=/data/config.yml # Mount at /data so the container's data path matches the host path # /data (which is a symlink to this directory — see runner-setup.md). # When a host-mode job does `docker run -v /data/.cache/act/…:/work`, # host docker resolves the source via the symlink instead of failing # with "no such file or directory". volumes: - ./data:/data - /var/run/docker.sock:/var/run/docker.sock command: >- /bin/sh -c "apk add --no-cache nodejs docker-cli && sleep 5 && forgejo-runner daemon --config /data/config.yml"