Skip to content

CI: pull every base image from GHCR's mirror by digest - #208

Merged
ndbroadbent merged 2 commits into
mainfrom
ci/use-ghcr-mirror
Dec 4, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
ci/use-ghcr-mirror

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Step 2 of taking Docker Hub off CI's critical path (step 1: #203, the mirror; #207 adds caddy to it).

  • Images: the Postgres services (app, visual-capture, journeys), the RustFS docker runs, release-bins' container:, setup-buildx's BuildKit and journeys' caddy all come from ghcr.io/docspring/mirror/<name>:<tag>@<digest>.
  • Login: the packages stay private, so jobs log in with GITHUB_TOKEN: workflow-level packages: read; credentials: on the services and the container; docker/login-action before the pulls. images now logs in on PRs too.
  • Dockerfile FROMs: CI overrides them through build-contexts (rust:1.99.1-trixie=docker-image://ghcr…@sha256:…; buildx and BuildKit normalise both names the same way). The Dockerfiles themselves are unchanged, so local builds keep Docker Hub.
  • Retries: scripts/ci/pull.sh pulls with backoff (5 attempts, 10–40 s apart).
  • Pins: scripts/journeys/run.sh uses ${CADDY_IMAGE:-caddy:2.11.9} (CI sets the mirror digest), and its aws-cli fallback is now amazon/aws-cli:2.17.0 instead of no tag.
  • Renderer: its inputs hash greps release-bins' image line, which changes, so the renderer rebuilds and rolls out once. The bytes are the same, only the reference changed.
  • Not changed: the aws-cli fallbacks in visual.sh and run.sh still name Docker Hub. They only run where aws isn't installed, and GitHub's runners have it.

#207 has merged and the mirror run copied caddy (digest matches). After this merges, I'll test from a fork PR.

Independent review (subagent): nothing serious. Its points: the merge order above, the aws-cli fallbacks, and the inputs grep matching its own line (now anchored).


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Results (run 47369999868, after #207, every image from the mirror): all green, and every image pulled on the first try.

  • Job times (min): visual-capture 7.6, journeys 4.5, release-bins 4.2, app 2.1, clients 1.5, images 1.3, lint 0.7, test 0.6, visual 0.3. These are in line with the baseline (PR p50 7.6 min).
  • images: BuildKit pulled from GHCR in 2.3 s, and the rust, node and debian named contexts loaded from the mirror.
  • VisualCI: the one journeys change was the CLI version in the add-to-CI snippet (a new CLI release; the same change was approved on Gallery: the visualci-gallery Rust crate (sc-9298) #197, which merged).

@visualci-com

visualci-com Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #794 · 521 unchanged · no changes

This PR vs base: 77 changed, 11 added since #698, across 4 builds

docspring/visualci · journeys · build #791 · 50 unchanged · no changes

This PR vs base: 3 changed since #691, across 5 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent marked this pull request as ready for review December 4, 2026 16:03
@ndbroadbent
ndbroadbent force-pushed the ci/use-ghcr-mirror branch 2 times, most recently from 2bfcc37 to 4e24d3e Compare December 4, 2026 16:21
Postgres services, RustFS, the release-bins container, BuildKit and the Dockerfiles' FROM images (through
build-contexts, so local builds keep Docker Hub) come from GHCR's copy, pinned by digest, and the docker run pulls
retry with backoff (scripts/ci/pull.sh). Jobs log in with GITHUB_TOKEN (packages: read). journeys' caddy is pinned
to 2.11.9 (CADDY_IMAGE in CI) and journeys' aws-cli fallback to 2.17.0.
@ndbroadbent
ndbroadbent merged commit 40dcc92 into main Dec 4, 2026
16 checks passed
@ndbroadbent
ndbroadbent deleted the ci/use-ghcr-mirror branch December 4, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant