Repository navigation
Docker buildx build image already created don't pull correctly #2418
Replies: 3 comments
|
This also affects docker compose (the plugin) for local only images (e.g. in tests): docker/compose#9939 Edit: docker buildx rm --all-inactive
docker buildx create --driver docker --use default # for me this gave an error but still worked
docker buildx inspect # should show Driver: docker |
|
Yeah, figured out what's happening here. When you run docker buildx create test --use, it spins up a docker-container driver by default, which basically isolates BuildKit in its own container. Local images you built with docker build don't exist inside that isolated container. So when BuildKit tries to resolve FROM test, it can't find anything locally and attempts to pull from docker.io/library/test instead — that's where your 407 is coming from. Few ways to fix it: This forces docker driver for that build, so you get access to local images. If you want the builder itself to use docker driver: Tradeoff is you lose the isolation and multi-platform builds get messy. If you need the docker-container driver (for multi-arch): BuildKit can access it that way. What are you trying to build — just local stuff or actually going multi-platform? |

Uh oh!
There was an error while loading. Please reload this page.
Hi,
I have this situation, I built a dockerfile, then I created an instance for buildx and subsequently I built another dockerfile with buildx which has as FROM the image I had built previously.
E.g.
Dockefile1:
docker build -t test test1/Dockerfile1docker buildx create test --useDockerfile2
docker buildx build -t test2 test2/Dockerfile2and i have this error
ERROR: failed to solve: test: failed to resolve source metadata for docker.io/library/test:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failedBut if i do the same thing without the buildx create command it work fine, but i need this commando to set a driver.
Anyone can help me? Thanks
All reactions