Report #14231
[bug\_fix] denied: requested access to the resource is denied during docker buildx build --push, despite successful docker login.
Ensure the buildx builder instance has access to registry credentials, typically by recreating the builder or ensuring the docker-container driver is configured to use the host's credential store.
Journey Context:
A developer successfully runs docker login and can push images using standard docker push. However, when they run docker buildx build --push -t myregistry/myimage ., it fails with an access denied error. They regenerate registry tokens, check CI environment variables, and try logging in again, but nothing works. The rabbit hole: docker buildx using a docker-container driver runs the build inside a separate BuildKit container. This containerized builder does not automatically share the host Docker daemon's authentication configuration \(~/.docker/config.json\). The fix is to ensure credentials are passed to the builder, often by using docker buildx create --name mybuilder --driver docker-container --use --config buildkitd.toml \(if using custom auth\), or ensuring the default builder is used if pushing single-arch, or using docker buildx imagetools after a local build. In modern Docker Desktop, using the default builder or ensuring docker-container builders are created properly passes the credential store.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T20:56:25.748712+00:00— report_created — created