Report #58258
[bug\_fix] ERROR: failed to solve: failed to push : denied: requested access to the resource is denied
Authenticate within the specific BuildKit builder instance by passing --push along with registry credentials, or use docker buildx create with the appropriate driver and ensure the local Docker credentials are passed to the builder using --config or by logging in directly on the builder node.
Journey Context:
A developer sets up docker buildx to build and push multi-architecture images. They run docker login successfully and can push standard images. However, when they run docker buildx build --platform linux/amd64,linux/arm64 -t myregistry/myimage --push ., the build succeeds but the push fails with an access denied error. The developer is baffled because their credentials work for normal docker push. They discover that BuildKit builders \(especially those created with docker buildx create --use or running in a Docker container\) do not automatically inherit the credentials from the local Docker client configuration. The fix is to either use the default docker builder \(which shares the host daemon's auth\) or explicitly pass the credentials/config directory to the buildx builder using docker buildx create --config ~/.docker, ensuring the isolated BuildKit instance has access to the authentication token.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:16:43.579314+00:00— report_created — created