Skip to content

feat(ci): add a pre-pull input to the reusable build workflow - #74

Merged
swimmesberger merged 1 commit into
mainfrom
wt/build-push-pre-pull
Aug 29, 2026
Merged

feat(ci): add a pre-pull input to the reusable build workflow#74
swimmesberger merged 1 commit into
mainfrom
wt/build-push-pre-pull

Conversation

@swimmesberger

Copy link
Copy Markdown
Owner

Follow-up to #66/#69, found by MuxBox's first run on the reusable workflow (failing run): a FROM on the plain-HTTP local registry fails under the docker driver with

failed to do request: Head "https://simondatastore:50000/v2/muxbox-dee/manifests/5.2.1": http: server gave HTTP response to HTTPS client

even though the daemon's insecure-registries names the registry.

Root cause (verified on the NAS with minimal FROM builds)

Synology's moby 24.0.2 has a resolver split:

  • docker pull / docker push (classic distribution path) honor insecure-registries — this is why Watchtower's redeploy pulls have always worked.
  • The daemon-embedded BuildKit's FROM-metadata resolver ignores it — the identical minimal build fails with the HTTPS error, with and without an external # syntax= frontend (so it isn't the frontend).
  • BuildKit is local-first: the same build succeeds the moment the image is present in the daemon's store (verified by pulling and re-running).

What changed

The reusable workflow gains an optional whitespace-separated pre-pull input: the named images are docker pulled after the registry login (the pulls may need the credentials — the local registry answers 401 anonymously) and before the build, going through exactly the insecure-aware, authenticated daemon path that works. The quirk and the fix are recorded in the design doc's operational notes.

The input is passed to the shell via env, not interpolated into the script, so tag values can't inject shell syntax.

Merge order

This must merge before swimmesberger/MuxBox's follow-up PR that passes pre-pull — calling a reusable workflow with an undefined input fails validation.

A FROM on the plain-HTTP local registry fails under the docker driver
with "server gave HTTP response to HTTPS client" even though the
daemon's insecure-registries names the registry: the daemon-embedded
BuildKit's FROM-metadata resolver ignores that setting (observed on
Synology's moby 24.0.2 — the classic pull/push paths honor it fine, and
the external dockerfile frontend makes no difference; verified with
minimal FROM builds on the host). BuildKit does resolve a
locally-present image without touching the network, so pulling the base
image first — through the daemon's insecure-aware, authenticated path —
makes the build work.

The reusable workflow gains an optional whitespace-separated `pre-pull`
input that docker-pulls the named images after the registry login and
before the build. The quirk and the fix are recorded in the design
doc's operational notes.
@swimmesberger
swimmesberger merged commit a705178 into main Aug 29, 2026
1 check passed
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