From 7bdf7b79d31d8d8b27d74c6211630a65536cc15d Mon Sep 17 00:00:00 2001 From: wt Date: Fri, 30 Oct 2026 13:50:29 +0700 Subject: [PATCH] ci: pull Docker Hub base images through a mirror in Docker publish BuildKit's docker-container driver ignores the host daemon's registry-mirrors, and the runner timed out reaching auth.docker.io. Configure a docker.io mirror (DOCKERHUB_MIRROR, default mirror.gcr.io). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/docker-publish.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index cc97eeb..354181e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -10,6 +10,7 @@ name: Docker publish # REGISTRY_OWNER - owner/namespace of the image (default: repository owner) # REGISTRY_REPO - image name (default: repository name) # REGISTRY_USER - the username owning the token (default: user who pushed the tag) +# DOCKERHUB_MIRROR - Docker Hub mirror for base images (default: mirror.gcr.io) # # NOTE: variable/secret names must NOT start with GITEA_ or GITHUB_. @@ -56,6 +57,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + # BuildKit runs in its own container and ignores the host daemon's + # registry-mirrors, so Docker Hub base images go through a mirror here. + buildkitd-config-inline: | + [registry."docker.io"] + mirrors = ["${{ vars.DOCKERHUB_MIRROR || 'mirror.gcr.io' }}"] - name: Log in to Gitea Container Registry uses: docker/login-action@v3