Files
Devin FoleyandPaperclip e9dae72c0c ci: use a Docker Hub mirror for image builds (#15756)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Image workflows build the exact source selected for a release.
> - BuildKit fetches the Dockerfile frontend and base images from Docker
Hub.
> - Docker Hub token failures can stop these builds before application
code runs.
> - BuildKit supports a public image cache with canonical Docker Hub
fallback.
> - This pull request configures that cache in the two affected image
builders.
> - The build inputs and publication gates stay the same.

## Linked Issues or Issue Description

**What happened?**

[Docker run
37995539183](https://github.com/paperclipai/paperclip/actions/runs/37995539183)
failed before application builds started. The AMD64 job received HTTP
504 from the Docker Hub token endpoint while it fetched
`docker/dockerfile:1.20`. The ARM64 job fetched the frontend, then
received the same error while it resolved `node:24-trixie-slim`.
[Release preview run
37992058052](https://github.com/paperclipai/paperclip/actions/runs/37992058052)
also failed while it fetched the frontend.

**Expected behavior**

Use the supported public cache when it has the requested Docker Hub
image. Retain canonical Docker Hub fallback when the cache has no usable
copy. Preserve build and publish failures.

**Steps to reproduce**

Run either affected image builder during a Docker Hub token failure. The
unconfigured BuildKit container contacts Docker Hub for the frontend and
base image. It cannot use a host Docker daemon mirror for those build
requests.

**Paperclip version or commit**

The observed Docker run used `00d944f96c8c4aba8332ce224df2be73a601228a`.
The preview used `b6b3cb3761dabd1bd668054e7a99a245d53707c4`.

**Deployment mode**

GitHub Actions image builds. No application runtime change.

The public PR and issue search found no matching open registry-mirror
change. #15743 addresses a separate npm canary dependency publication
failure.

## What Changed

- Add the official `docker.io` to `mirror.gcr.io` BuildKit configuration
to the public Docker build matrix and the release preview image builder.
- Keep all existing action references, image sources, targets, build
arguments, platforms, credentials, cache settings, outputs, permissions,
triggers, and publication gates.
- Extend the existing dependency-free workflow tests to check mirror
placement, verified HTTPS, both native platforms, preview isolation, and
publication access.
- Document cache eviction, tag freshness, canonical fallback, and
builder bootstrap limits.

## Verification

- `node --test scripts/__tests__/release-verify-workflow.test.mjs
scripts/cloud-source-verification.test.mjs
scripts/standard-image-contract.test.mjs`: 43 passed on the final
source. No dependency install required.
- Six offline controls removed each builder's mirror, changed the
registry or cache host, enabled insecure transport, or added preview
registry login. Each control failed the new check as expected.
- `actionlint -shellcheck='' .github/workflows/docker.yml
.github/workflows/release.yml`: workflow validation passed. With
optional ShellCheck enabled, the ten diagnostics match the unchanged
base exactly. This PR changes no shell scripts.
- A real TOML parser accepted the inline configuration. Removing the new
block from each workflow produced byte-identical base files.
- Read-only registry metadata checks confirmed matching raw bytes and
SHA256 values for the current Node24 index and both native manifests.
The Dockerfile frontend index and both native manifests also match
Docker Hub and Google. No image config blobs or layers were fetched.
- Full application tests, typecheck, and build were not repeated locally
because application source is unchanged. [Hosted
CI](https://github.com/paperclipai/paperclip/actions/runs/37998739440)
passed the full required checks on `25fd57f`, including all test shards,
build, typecheck, policy, E2E, and canary dry run.
- The supply-chain advisory returned neutral because it cannot verify
these infrastructure edits. It reported zero annotations. Independent
review confirmed all action references, Dockerfiles, package files, and
lockfiles are unchanged. The other 53 checks passed; two Storybook
checks skipped as expected.
- Independent review approved all four changed files and the workflow
graph. Greptile scored the same source 5/5 with no unresolved comments.
- No Docker build, workflow rerun, image publish, or deployment was
started for verification. A normal image workflow after merge must prove
full image acquisition.

## Risks

Google is a cache, not an outage guarantee. It can evict images. Mutable
tags can lag upstream changes or deletions. Matching manifests now does
not prove future tag freshness or blob availability. A cache miss can
still fail when Docker Hub is unavailable. The initial
`moby/buildkit:buildx-stable-1` bootstrap uses the host Docker daemon
before this configuration takes effect and remains dependent on Docker
Hub.

The registry mirror applies to image pull and resolution only. GHCR
publication and cache writes keep their existing routes. See [Docker's
supported
configuration](https://docs.docker.com/build/ci/github-actions/configure-builder/#registry-mirror)
and [Google's cache
limits](https://docs.cloud.google.com/artifact-registry/docs/pull-cached-dockerhub-images).

## Model Used

OpenAI GPT-6 through Codex, with reasoning and code execution tools. The
exact service variant and context window are not exposed in this
session.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` /
`Closes: #` / `Refs #` OR (b) described the issue in-PR following the
relevant issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-10-09 17:15:50 -07:00
..
2026-04-09 06:14:12 -05:00