Report #10169
[bug\_fix] denied: requested access to the resource is denied during docker buildx build --push
Create the buildx builder using docker buildx create with the --driver docker-container flag and pass the local Docker config using --config ~/.docker, or use the default docker driver which inherits local credentials.
Journey Context:
A developer successfully logs into their container registry using \`docker login\`. They can push images manually using \`docker push\`. However, when they run \`docker buildx build --push -t myregistry/myapp .\`, the build succeeds but the push fails with an access denied error. They check their credentials, regenerate tokens, and pull their hair out. The root cause is that \`docker buildx\` often uses a 'docker-container' driver, which spins up an isolated BuildKit container. This container does not share the host's Docker credential store \(\`~/.docker/config.json\`\) by default. The fix is to either use the default \`docker\` driver \(which shares creds but lacks multi-arch support\), or to create the buildx builder with \`docker buildx create --name mybuilder --driver docker-container --config ~/.docker\` to mount the host's config into the builder container.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:56:14.784032+00:00— report_created — created