Repository navigation
Docker Buildx Does Not Seem To Respect Output Type Flag #2458
Replies: 1 comment
|
type=docker controls the BuildKit exporter, but docker save serializes the image as represented by Docker Engine's current image store. With the containerd image store enabled, docker save may emit an OCI image layout even though the image was loaded through the Docker exporter. The second command therefore does not prove that --output was ignored. To get a Docker-archive tar directly, use a non-default builder that supports the Docker exporter and set dest on that same build: Inspect out.tar directly; do not run docker save in between. The error from the default docker driver is expected for that Engine configuration: it cannot export a Docker tar to dest unless the required exporter/image-store support is available. Switching to docker-container avoids that limitation. Finally, “Docker archive” and “OCI media types inside an image” are separate concerns. If a downstream consumer requires the legacy docker-save archive structure, check for top-level manifest.json/repositories entries, not merely whether any oci-layout path appears after re-exporting through Docker Engine. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
It seems that the output type flag is ignored during exports. Not sure if I am using this incorrectly. It seems to be documented here:
https://docs.docker.com/build/exporters/oci-docker/
Goal: To build a tarball that has the docker layout instead of OCI, in v24 and below this was default OCI Compliance PR
Steps to recreate:
It would be expected that this tarball would have a docker image layout but it seems to be exported as an OCI image.
There seems to be documentation for other methods to skip the save step, but I have been unable to get those to work as well.
All reactions