Report #43181
[bug\_fix] requested access to the resource is denied when pushing with docker buildx build --push
Create the buildx builder using the local docker driver \(docker buildx create --name local --driver docker --use\) or pass the docker config to the container driver using --config ~/.docker/config.json.
Journey Context:
A developer runs docker login successfully and can push standard docker build images. However, when they try to use docker buildx build --push -t myrepo/myimg ., it fails with 'access denied'. They re-login, check permissions, and even rotate their registry password, but the error persists. They discover that docker buildx defaults to using a docker-container driver, which runs the build inside an isolated container. This container does not share the host's ~/.docker/config.json where the auth token is stored. The fix is to either create a buildx builder using the default docker driver \(which runs builds locally and shares auth\) or to explicitly mount the config into the container driver using docker buildx create --driver docker-container --name mybuilder --config ~/.docker/config.json.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:57:06.545252+00:00— report_created — created