Skip to content

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 - #150

Open
piob-io wants to merge 1 commit into
mainfrom
devin/1795020504-fallback-dockerio-https
Open

piob-io wants to merge 1 commit into
mainfrom
devin/1795020504-fallback-dockerio-https

Conversation

@piob-io

@piob-io piob-io commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Let docker buildx imagetools create push Docker Hub manifest lists from the fallback builder

When the action falls back to the local docker-container builder, docker buildx imagetools create -t docker.io/... fails with 404 Not Found on the manifest PUT. With this PR it pushes over HTTPS. (BLA-5188)

  • Affected: any job that ends up on the fallback builder and then pushes a manifest list to Docker Hub with buildx.
  • Not affected: the Blacksmith (remote driver) builder, which gets no config file from buildx, and BuildKit's own image pushes.

Set http and insecure only on the Blacksmith mirror's registry entry

The 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-container builder's config for its own registry calls. http = true on docker.io made it send them to http://registry-1.docker.io; Docker Hub answers 301 to HTTPS, and the redirected PUT becomes a body-less GET.

# registry section, before             # after
[registry."docker.io"]                  [registry."docker.io"]
mirrors = ["http://<agent>:5000"]       mirrors = ["http://<agent>:5000"]
http = true
insecure = true

[registry."<agent>:5000"]               [registry."<agent>:5000"]
http = true                             http = true
insecure = true                         insecure = true

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.toml for 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-container builder)

Config buildx requests to http://registry-1.docker.io BuildKit pull reaches the HTTP mirror
before every request, all answered 301 yes
after none yes

Not checked: the manifest push against Docker Hub with real 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


View full Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need. (Staging)


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


🟢 Devin Review found nothing to fix · View findings

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

… 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>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1795020504-fallback-dockerio-https branch from ae3d4c8 to 190a168 Compare November 18, 2026 17:04
@devin-ai-integration devin-ai-integration Bot changed the title setup_builder: keep Docker Hub on HTTPS in the fallback builder so buildx imagetools create can push manifest lists 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 Nov 18, 2026
@piob-io
piob-io marked this pull request as ready for review November 18, 2026 17:59

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@blacksmith-sh

blacksmith-sh Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Matches imagetools create pushes to Docker Hub from fallback builder

Without the PR the manifest-list PUT hit Docker Hub's HTTP port, was redirected as a GET and failed with 404 Not Found; with it the PUT went over HTTPS, returned 201 and the two-platform list is readable. Against real Docker Hub, buildx's plain-HTTP requests dropped to none.

Merge-base

Manifest list push

This PR 190a1681

Manifest list push

Merge-base

Real Docker Hub reads

This PR 190a1681

Real Docker Hub reads

Also checked · 2 match

Matches Fallback builder pulls still hit the HTTP mirror
Matches buildkitd verifies Docker Hub TLS

Proof on 190a1681 · mocked: Docker Hub (needs DOCKERHUB_USERNAME, DOCKERHUB_TOKEN) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@blacksmith-staging

Copy link
Copy Markdown

Matches imagetools create pushes to Docker Hub over HTTPS

Without this PR buildx sent all 105 Docker Hub calls over plain HTTP, the manifest PUTs came back as GETs and the push failed with 404; with it every call used HTTPS and the manifest list was pushed.

Merge-base

Request log

This PR 190a1681

Request log

Also checked · 2 match

Matches BuildKit pulls still use the HTTP mirror
Matches Docker Hub TLS certificate is verified

Proof on 190a1681 · mocked: Blacksmith Docker mirror (The mirror lives on the Blacksmith VM agent; a local pull-through registry liste...), Docker Hub (needs DOCKERHUB_USERNAME, DOCKERHUB_TOKEN) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

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.

2 participants