This use-case is driven by the Docker containerd image-store beta, see docker/roadmap#371 (comment) for the initial failure case, and then a bunch more messages after for detailed dives, if the below description is insufficient.
Currently --load is equivalent to --output=type=docker,dest=, which triggers a special code-path in buildx to receive the image back from BuildKit as a tar stream, and pass it into the moral equivalent of docker load.
The containerd image-store beta enables multi-platform builds, which produce a manifest list (or image index in OCI terms) ,which the docker exporter cannot handle.
Some testing shows that the OCI equivalent of --load, i.e. --output=type=oci,dest= fails with the following error:
ERROR: failed to solve: method /moby.filesync.v1.FileSend/diffcopy not supported by the client
As far as I can guess (which is why I'm posting it here) this is due to the magic used for the docker exporter not being hooked up for the oci exporter.
However, I haven't tested that this magic would be sufficient. I haven't actually worked out (from GitHub browsing) how adding that output writer leads to another protobuf method being registered on the client. And I'm also guessing that buildx is the client-in-question here.
I have noted that in the single-platform case, --output=type=docker,dest= works identically to --load (as documented, --load is a trivial alias), and --output=type=oci,dest= fails the same way, so this is not manifest-list specific.
I have also noted that --output=type=oci,dest=somefile.tar in both single-platform and multi-platform mode produces a file that is usable with docker load -i, which suggests that everything is fine in both BuildKit and Docker for this data-flow. (--output=type=oci can be piped directly into docker load under WSL2, but on Windows native consoles (PowerShell and git bash) that's getting intermingled progress output for some reason. That's a different issue though.)
So there's really two requests here:
- Make
--output=type=oci,dest= work like --output=type=docker,dest=, i.e. loading into a Docker instance.
- Somehow make that shorter to type, e.g.,
--load-oci or something not-ugly. Or even make --load an alias for --output=type=oci,dest= instead, perhaps just in multi-platform mode?
Sorry if this is a duplicate, I couldn't find a tracking ticket for this use-case in any of the three repos (moby, buildkit, or here), and have ended up generating a lot of noise in docker/roadmap#371 instead.
This use-case is driven by the Docker containerd image-store beta, see docker/roadmap#371 (comment) for the initial failure case, and then a bunch more messages after for detailed dives, if the below description is insufficient.
Currently
--loadis equivalent to--output=type=docker,dest=, which triggers a special code-path in buildx to receive the image back from BuildKit as a tar stream, and pass it into the moral equivalent ofdocker load.The containerd image-store beta enables multi-platform builds, which produce a manifest list (or image index in OCI terms) ,which the
dockerexporter cannot handle.Some testing shows that the OCI equivalent of
--load, i.e.--output=type=oci,dest=fails with the following error:As far as I can guess (which is why I'm posting it here) this is due to the magic used for the
dockerexporter not being hooked up for theociexporter.However, I haven't tested that this magic would be sufficient. I haven't actually worked out (from GitHub browsing) how adding that output writer leads to another protobuf method being registered on the client. And I'm also guessing that buildx is the client-in-question here.
I have noted that in the single-platform case,
--output=type=docker,dest=works identically to--load(as documented,--loadis a trivial alias), and--output=type=oci,dest=fails the same way, so this is not manifest-list specific.I have also noted that
--output=type=oci,dest=somefile.tarin both single-platform and multi-platform mode produces a file that is usable withdocker load -i, which suggests that everything is fine in both BuildKit and Docker for this data-flow. (--output=type=ocican be piped directly intodocker loadunder WSL2, but on Windows native consoles (PowerShell and git bash) that's getting intermingled progress output for some reason. That's a different issue though.)So there's really two requests here:
--output=type=oci,dest=work like--output=type=docker,dest=, i.e. loading into a Docker instance.--load-ocior something not-ugly. Or even make--loadan alias for--output=type=oci,dest=instead, perhaps just in multi-platform mode?Sorry if this is a duplicate, I couldn't find a tracking ticket for this use-case in any of the three repos (moby, buildkit, or here), and have ended up generating a lot of noise in docker/roadmap#371 instead.