Use host networking for job containers
Some checks failed
Test CI / test (pull_request) Failing after 36s

Containers need to reach localhost:3001 (Forgejo) for git operations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-01-24 10:30:28 -08:00
commit 15e3ec98ea
2 changed files with 3 additions and 2 deletions

View file

@ -27,5 +27,5 @@ forgejo_runner_capacity: 2
forgejo_runner_timeout: 3h
# Docker container settings for jobs
forgejo_runner_docker_network: bridge
# Note: network is hardcoded to "host" so containers can reach localhost:3001 (Forgejo)
forgejo_runner_privileged: true # Needed for container builds

View file

@ -8,7 +8,8 @@ runner:
timeout: {{ forgejo_runner_timeout }}
container:
network: "{{ forgejo_runner_docker_network }}"
# Use host network so containers can reach localhost:3001 (Forgejo)
network: "host"
privileged: {{ forgejo_runner_privileged | lower }}
# Mount Docker socket so jobs can build containers
valid_volumes: