Report #22667
[bug\_fix] ERROR: failed to solve: pull access denied, repository not found or authorization failed for private base image
When using \`docker buildx\`, ensure you are using the \`docker\` driver \(which inherits local auth\) OR pass the Docker config explicitly to the \`docker-container\` driver using \`--config\` or secrets mounting.
Journey Context:
A developer switches from \`docker build\` to \`docker buildx build\` to build multi-platform images. Their Dockerfile starts with \`FROM myregistry.com/myorg/private-base:latest\`. The build immediately fails with an authentication error. They are confused because \`docker pull myregistry.com/myorg/private-base:latest\` works perfectly, and they are logged in. They try re-logging in, checking token expiry, and verifying network access. The rabbit hole: \`docker buildx\` often defaults to using a \`docker-container\` driver, which spins up a separate BuildKit container to build the image. This isolated container does \*not\* share the host's Docker credential store \(\`~/.docker/config.json\`\) by default. The fix works by either using the default \`docker\` driver \(which runs BuildKit inside the existing Docker daemon and shares its authenticated context\) or by explicitly passing the credentials to the \`docker-container\` driver using buildx configurations or secrets, bridging the auth gap between the host and the isolated builder container.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:27:10.115937+00:00— report_created — created