From dcf573e0f63f13882dc5510a802622ad2fc5a074 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Tue, 7 Jul 2026 22:45:35 +0530 Subject: [PATCH] fix(ci): use explicit container: block for reliable job-level docker options Forgejo's docs note --add-host via the runner's global container.options config is not reliably honored for jobs using pure label-based runs-on mapping. Setting the same image + options explicitly per-job via jobs.build.container is the more directly supported path for per-job container customization. Co-Authored-By: Claude Sonnet 5 --- .forgejo/workflows/build.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index c046de9..610d258 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -13,12 +13,16 @@ concurrency: jobs: build: runs-on: docker-ready + # Explicit container: (rather than relying only on the docker-ready + # label mapping) so job-level container options are reliably honored. + container: + image: ci.nxtgauge.com/admin/forgejo-runner-job:bookworm + options: --add-host=host.docker.internal:host-gateway env: # 127.0.0.1 doesn't work here: the job container is nested one level # inside the runner pod's dind sidecar, so its own loopback isn't the - # sidecar's. host.docker.internal (mapped via --add-host in the - # runner's container.options) reaches back to the dind engine that - # actually spawned this container. + # sidecar's. host.docker.internal (mapped via --add-host above) + # reaches back to the dind engine that actually spawned this container. DOCKER_HOST: tcp://host.docker.internal:2375 DOCKER_BUILDKIT: "1" steps: