Repository navigation
setup_builder: set http/insecure only on the Docker mirror entry so buildx imagetools create can push Docker Hub manifest lists from the fallback builder (release/v2) - #151
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
… entry The mirror is the only plain-HTTP endpoint. With http = true on the docker.io entry, buildx read the fallback builder's config and sent imagetools create's manifest PUT to Docker Hub over plain HTTP; the 301 to HTTPS turned it into a GET that returned 404. Docker Hub gets BuildKit's defaults: HTTPS with certificate verification. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
66875f1 to
8356cea
Compare
buildx imagetools create can push manifest lists (release/v2)buildx imagetools create can push Docker Hub manifest lists from the fallback builder (release/v2)
|
|
A stand-in for registry-1.docker.io runs on the runner: TLS on :443 and, like Docker Hub, a 301 to HTTPS for every plain-HTTP request on :80. - fallback builder: `buildx imagetools create` pushes a manifest list and no request reaches :80. - Blacksmith builder: `buildx build --push` succeeds with a trusted certificate and fails on x509 with an untrusted one. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
019d459 to
b29c7f9
Compare


Summary
Let
docker buildx imagetools createpush Docker Hub manifest lists from the fallback builderWhen the action falls back to the local
docker-containerbuilder,docker buildx imagetools create -t docker.io/...fails with404 Not Foundon the manifest PUT. With this PR it pushes over HTTPS. (BLA-5188)remotedriver) builder, which gets no config file from buildx, and BuildKit's own image pushes.Set
httpandinsecureonly on the Blacksmith mirror's registry entryThe mirror is the only plain-HTTP endpoint, so
getDockerMirrorRegistryConfig()puts the two flags only on the mirror's own entry. Docker Hub gets BuildKit's defaults.buildx reads the
docker-containerbuilder's config for its own registry calls.http = trueondocker.iomade it send them tohttp://registry-1.docker.io; Docker Hub answers 301 to HTTPS, and the redirected PUT becomes a body-less GET.BuildKit takes a mirror's scheme and TLS settings from the mirror's own entry, so pulls still go to the mirror over HTTP.
Verify Docker Hub's TLS certificate in the Blacksmith buildkitd
buildkitd.tomlfor the Blacksmith builder comes from the same function, so it changes the same way. On the base branch, buildkitd talks to Docker Hub over HTTPS without certificate verification and retries over plain HTTP on a TLS error. With this PR it uses verified HTTPS only.Checked locally (buildx v0.36.1, buildkit v0.34.2,
docker-containerbuilder)http://registry-1.docker.ioTest in CI that Docker Hub is reached over verified HTTPS
The new
Test Docker Hub HTTPSworkflow runs on a Blacksmith runner against a stand-in forregistry-1.docker.io(.github/scripts/dockerhub-standin.sh): TLS on :443 and, like Docker Hub, a 301 to HTTPS for every plain-HTTP request on :80.cache-key)docker buildx imagetools createpushes a manifest list; no request reaches :80docker buildx build --pushsucceeds with a trusted certificate; no request reaches :80x509errorWith the base branch's registry config the fallback job's push fails with the
404 Not Found(checked locally with the same script).Not checked: the manifest push against the real Docker Hub with push credentials.
Link to Devin session: https://app.devin.ai/sessions/a2912f9d80634ddcb92d74203680bb62
Open in Devin Desktop: https://app.devin.ai/desktop/session/a2912f9d80634ddcb92d74203680bb62?variant=devin
Requested by: @piob-io
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need. (Staging)🟢 Devin Review found nothing to fix · View findings