From 1188fca412f3190bdac0ad350cba3ea161434d23 Mon Sep 17 00:00:00 2001 From: dingo Date: Fri, 11 Sep 2026 16:57:25 -0400 Subject: [PATCH] ci: reach the Docker daemon by its runner alias again The publish job pinned DOCKER_HOST to 172.17.0.1, a workaround from when the runner's --add-host=docker-host alias was not reaching job containers. The daemon no longer answers on that bridge address, so buildx could not connect. Use the alias the runner config provisions (tcp://docker-host:2375), still set at job level so the buildx and build-push JS actions inherit it. Co-Authored-By: Claude Opus 5 --- .gitea/workflows/build.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 07a5a53..86f190e 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -50,15 +50,12 @@ jobs: outputs: digest: ${{ steps.build.outputs.digest }} env: - # gitea-runner-config sets container.options: --add-host=docker-host:host-gateway, - # meant to make "docker-host" resolve inside job containers -- but that alias isn't - # landing on this job's own container (DNS lookup of docker-host fails), even though - # act_runner's own connection to the same daemon (proven by verify's Postgres service - # working) resolves it via the pod's hostAliases to 172.17.0.1. Use that address - # directly rather than depend on the container-option alias. - # TODO(ops): fix container.options/--add-host so job containers get "docker-host" - # for real, then this can go back to using that name instead of a hardcoded IP. - DOCKER_HOST: tcp://172.17.0.1:2375 + # The runner provisions the daemon as "docker-host" (container.options: + # --add-host=docker-host:host-gateway), so name it rather than a bridge IP: + # 172.17.0.1 was a workaround from when that alias did not reach job containers, + # and it stops resolving whenever the daemon moves. Set here at job level so every + # step -- including the buildx and build-push JS actions -- inherits it. + DOCKER_HOST: tcp://docker-host:2375 steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3