You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've built an image using docker buildx build that I exported to a file, and for a subsequent build that's running on another machine I need to import/load that first image into the builder so it has access to it.
As far as I can tell there is no way to tell docker load -i image to load the image into the buildx builder.
This seems like a missing feature in the buildx functionality that would be valuable for builds that depend on local images that need to be loaded when a registry cannot be used for the intermediary image.
Reacted by Alexey Palazhchenko, DasSkelett, Denis Baryshev, Dylan Madisetti, Charlie Briggs, Ayaz Salikhov, Tahina Ramananandro (professional account), 신재민(Jaemin Shin)/Dispatch, Reese Wang, Cashmaney and 36 more
Thanks @crazy-max. @tonistiigi also discussed with me in the buildkit Slack channel and helped me understand where the capabilities are and aren't. If there's plan to support loading images into buildx builders in the future it'd be great to keep this issue open. Or if that is not part of the plan, please close.
@AlekSi I've read the other issues but it is unclear where it's going. Is it closed as won't fix? Just so I understand if this is likely to be something in the future or not. Thanks!
@leighmcculloch could you tell me please, have you found a way to overcome this issue?
I want to do almost the same thing, but between different GitHub jobs.
So, one job builds an image, uploads it as an artifact, another job downloads this image and wants to use this image as a base image for another image. @crazy-max maybe you could help me?
Got it, thank you. I ended up using ARM runners for GitHub actions and using docker save and uploading and downloading artifacts. It's a bit slow, but works really well.
oci-layout:// named build contexts (added in v0.9.0, 02bae94) do this without a registry. Export on machine A with docker buildx build -o type=oci,dest=out.tar ., extract the tar, then on machine B run docker buildx build --build-context base=oci-layout:///path/to/layout@sha256:<digest> . (or contexts = { base = "oci-layout://..." } in bake) and reference it with FROM base. See --build-context in https://docs.docker.com/reference/cli/docker/buildx/build/. Consuming the un-extracted tar directly is tracked in #1553.
Activity
crazy-max commentedon Nov 18, 2021
@leighmcculloch #159 (comment)
zachary-povey commentedon Nov 18, 2021
@crazy-max is there any scope for the
docker-containerdriver supporting building from local images in the future?By switching to using the
dockerdriver to achieve this you end up losing support for a bunch of other stuff (multi-arch builds, registry caching).leighmcculloch commentedon Nov 18, 2021
Thanks @crazy-max. @tonistiigi also discussed with me in the buildkit Slack channel and helped me understand where the capabilities are and aren't. If there's plan to support loading images into buildx builders in the future it'd be great to keep this issue open. Or if that is not part of the plan, please close.
AlekSi commentedon Jan 28, 2022
See also #186 (closed, but not resolved) and #430.
leighmcculloch commentedon Jan 28, 2022
@AlekSi I've read the other issues but it is unclear where it's going. Is it closed as won't fix? Just so I understand if this is likely to be something in the future or not. Thanks!
AlekSi commentedon Jan 28, 2022
I don't know; I'm just a user with this or a similar problem, doing a cross-linking. :)
dmadisetti commentedon May 2, 2022
This is a bit of an issue for containers built with Nix as well, and makes docker/build-push-action@v2 less than useful
mathbunnyru commentedon May 12, 2022
@leighmcculloch could you tell me please, have you found a way to overcome this issue?
I want to do almost the same thing, but between different GitHub jobs.
So, one job builds an image, uploads it as an artifact, another job downloads this image and wants to use this image as a base image for another image.
@crazy-max maybe you could help me?
leighmcculloch commentedon Nov 19, 2022
@mathbunnyru I found no way to do this with
buildxand it sounded like from discussions on the Docker Slack that there isn't plans to support it.What I ended up doing was using
buildxfor my builds with no dependencies, and then plain oldbuildfor the image build that needed to pull in the others. See here: https://github.com/stellar/quickstart/blob/68fa964e61e58e57fa3d1dd58bc13d4b4ab0633c/.github/workflows/Dockerfile.dev.ymlmathbunnyru commentedon Nov 20, 2022
Got it, thank you. I ended up using ARM runners for GitHub actions and using
docker saveand uploading and downloading artifacts. It's a bit slow, but works really well.Push and pull 'nightly' tag Docker images in nightly test job (#25619)
crazy-max commentedon Sep 10, 2026
oci-layout://named build contexts (added in v0.9.0, 02bae94) do this without a registry. Export on machine A withdocker buildx build -o type=oci,dest=out.tar ., extract the tar, then on machine B rundocker buildx build --build-context base=oci-layout:///path/to/layout@sha256:<digest> .(orcontexts = { base = "oci-layout://..." }in bake) and reference it withFROM base. See--build-contextin https://docs.docker.com/reference/cli/docker/buildx/build/. Consuming the un-extracted tar directly is tracked in #1553.