New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when handling FROM, buildx should check local image store first? #199
Comments
|
To use images from docker image store you need to use the |
|
thanks @tonistiigi , after switched to One similar question on The related code is buildx/driver/docker-container/driver.go Line 62 in 8bce430
I think before ImageCreate(), we can call ImageInspectWithRaw() to check docker image store?
|
|
@jingxiaolu Sure, we should probably still try to pull first, but if it fails we could check if image with that name already exists and not error if it does. |
|
@tonistiigi thanks for your clarification! |
|
@jingxiaolu yes |
When booting `docker-container` driver, it will pull and run image `moby/buildkit:buildx-stable-1`. If current node cannot connect to dockerhub, driver `docker-container` will always booting failure. But user may already load the image manually or pull it from a priviate registry. Buildx should check local docker image store after pull failed. Fixes: docker#199 issuecomment-561996661 Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
When booting `docker-container` driver, it will pull and run image `moby/buildkit:buildx-stable-1`. If current node cannot connect to dockerhub, driver `docker-container` will always booting failure. But user may already load the image manually or pull it from a priviate registry. Buildx should check local docker image store after pull failed. Fixes: docker#199 issuecomment-561996661 Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
When booting `docker-container` driver, it will pull and run image `moby/buildkit:buildx-stable-1`. If current node cannot connect to dockerhub, driver `docker-container` will always booting failure. But user may already load the image manually or pull it from a priviate registry. Buildx should check local docker image store after pull failed. Fixes: docker#199 issuecomment-561996661 Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
When booting `docker-container` driver, it will pull and run image `moby/buildkit:buildx-stable-1`. If current node cannot connect to dockerhub, driver `docker-container` will always booting failure. But user may already load the image manually or pull it from a priviate registry. Buildx should check local docker image store after pull failed. Fixes: docker#199 issuecomment-561996661 Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
Env:
docker 19.03.5 + buildx, no connection to dockerhub
buildx version:
github.com/docker/buildx v0.3.1-13-g8bce430.m 8bce430f4d74c9a9ca72a46139804e88502d4b78.mWhat I'm trying to do
Build a simple image with Dockerfile:
Problem I met
I have loaded the image
xxx_gcc:aarch64to dockerd, so this Dockerfile works fine withdocker build .But when I try
docker buildx build ., it fails with:What I expect
When
docker build, it will first check whether the image inFROMexists in local store, butdocker buildx buildalways trying to pull it from remote registry.For this case, from my POV, buildx should only pull the image from remote registry when
--pullis specified:Please help to check, thanks!
The text was updated successfully, but these errors were encountered: