Skip to content
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

Add method to docker load image into buildkit instance #2468

Open
leighmcculloch opened this issue Nov 17, 2021 · 1 comment
Open

Add method to docker load image into buildkit instance #2468

leighmcculloch opened this issue Nov 17, 2021 · 1 comment

Comments

@leighmcculloch
Copy link

It doesn't appear to be possible to load a docker image into a buildkit instance for use in buildx builds.

I'm converting a workflow from docker build to docker buildx using buildkit, and I don't think it is possible to completely copy the same workflow because of a missing feature. I've looked in docs for how to do this but as far as I can tell it isn't possible.

My workflow is:

  1. Build an image on one machine with docker build and save the docker image using docker save -o <image>.
  2. Load the image onto a second machine with docker load -i <image>.
  3. Build a second image that is dependent on the first image that was loaded in step 2 using docker build.

When I replicate my flow with buildkit this is what I do:

  1. Build an image on one machine with docker buildx build ... -o type=docker,dest=/tmp/image.
  2. Load the image onto a second machine with docker load -i <image>.
  3. Build a second image that is dependent on the first image that was loaded in step 2 using docker buildx build ....

In step 3 of the buildkit flow the build fails because it cannot see the image that was loaded in step 2. I assume this is because loading the image with docker load loads the image into the local docker images, and not into the buildkit instances images.

I don't see a way to load images into a buildx/buildkit instance in the same way we can run docker load with regular docker today. It would be awesome if there was a way to do this.

@leighmcculloch
Copy link
Author

I may have opened this issue in the wrong repo, so I opened docker/buildx#847.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants