imagetools create
with single source changes copied image from application/vnd.docker.distribution.manifest.v2+json
to application/vnd.docker.distribution.manifest.list.v2+json
#2481
Labels
Contributing guidelines
I've found a bug and checked that ...
Description
Based on documentation from https://docs.docker.com/reference/cli/docker/buildx/imagetools/create/ that says:
I would expect that running
imagetools create
against one source with a mediaType ofapplication/vnd.docker.distribution.manifest.v2+json
and a configType ofapplication/vnd.docker.container.image.v1+json
to produce a "carbon copy" that has the same mediaType and configType, however instead I end up with a copy that is now a manifest list, or in other words, it now has a mediaType ofapplication/vnd.docker.distribution.manifest.list.v2+json
.Expected behaviour
We have an image at (made-up registry and repo obviously)
foo/bar:oldimage
with the following manifest (shrunk for readability):I would expect that running the command
docker buildx imagetools create -t foo/bar:newimage foo/bar:oldimage
, which has a single source that is a single platform distribution manifest, would create a new image atfoo/bar:newimage
with a manifest that basically looks the same as the above with the samemediaType
andconfigType
.Actual behaviour
Instead, the image at
foo/bar:newimage
is now a manifest list and looks more like:Buildx version
github.com/docker/buildx v0.14.0-52-g55c86543 55c8654
Docker info
Builders list
Configuration
Minimal Dockerfile (tried with a couple of other base image like
alpine
, etc. that all behaved the same way)Command I ran (with fake registry/repo)
Build logs
No response
Additional info
Now, I'm partially calling this a bug and partially asking if maybe I just don't understand the intention behind this if it isn't a bug, because when you run
docker buildx build ...
and only specify one platform (or no platform), you get an image with a manifest just like the one shown above forfoo/bar:oldimage
-- in other words, you basically get a single platform distribution manifest instead of a manifest list. So, based on that behavior AND based on the documentation I mentioned above it definitely seems like I should be getting a copy atfoo/bar:newimage
that is a single platform distribution manifest, not a manifest list.The text was updated successfully, but these errors were encountered: