Build gitea-runner with docker CLI installed natively
Some checks are pending
Deploy with Docker Compose / deploy (push) Waiting to run

Mounting host docker binary failed due to glibc/musl incompatibility.
Instead, extend the act_runner image and install docker-cli and
docker-cli-compose via apk.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-07 13:02:06 +01:00
parent ce1a1ee757
commit 74f606459f
2 changed files with 6 additions and 3 deletions

View File

@@ -178,7 +178,9 @@ services:
- SYMFONY__ENV__DATABASE_PASSWORD=${POSTGRES_PASSWORD}
gitea-runner:
image: gitea/act_runner:latest
build:
context: ./gitea-runner
dockerfile: Dockerfile
container_name: "${GITEA_RUNNER_HOST}"
environment:
GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME}
@@ -190,8 +192,6 @@ services:
- ./gitea-runner/config.yaml:/config.yaml
- ./gitea-runner/data:/data
- /var/run/docker.sock:/var/run/docker.sock # WARNING: Docker socket mount gives container host-level access. Runner is in 'disabled' profile to mitigate risk.
- /usr/bin/docker:/usr/bin/docker:ro
- /usr/lib/docker/cli-plugins:/usr/lib/docker/cli-plugins:ro
- /home/adamf/deploy/web_server:/home/adamf/deploy/web_server # Same path on host and container so docker compose bind mounts resolve correctly
restart: unless-stopped
networks:

3
gitea-runner/Dockerfile Normal file
View File

@@ -0,0 +1,3 @@
FROM gitea/act_runner:latest
RUN apk add --no-cache docker-cli docker-cli-compose