-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman push does not preserve docker manifest type as of podman v5.1.0 #22976
Comments
@nalind do you figure this is on the Podman side or something vendored in? |
I was able to build and push an image using the provided Dockerfile. If you're using Fedora, like I am, then pushing the built image with If you're not using Fedora, then more diagnostic information would be really helpful here. The full @baude, I think the logic controlling what happens here is mostly in containers/image and partially in containers/storage, but I could see this as being an expected consequence of setting an [engine] compression_type in containers.conf. |
@nalind Thanks for checking! Are you also able to reproduce the old behavior when using 5.0.3 - that it does not change the Docker format to OCI? Can you confirm if the new behavior as of 5.1.0 is a bug? If we have an image already built in Docker format, then I would expect pushing it without any flags to change the format should still retain the same format. That is what we see in earlier versions of podman. Or is this behavior by design now to default pushes to OCI format? So to preserve Docker format, we should use Here is my current
Here is a push with debug:
|
I was not able to reproduce different behavior with a copy of 5.0.3 built from source, but if you're using a packaged version of 5.0.3, it may have come with a containers.conf that did include the configuration change. At any rate, a |
Check to see if zstd:chunked is set as compression-format. podman push --help | grep compression-format |
@nalind Thanks for checking your copy of 5.0.3. I thought it was something consistently reproducible in code, but sounds like it is packaging dependent. For more context, the original place we saw impact was from our scripts that use images from quay.io podman/stable releases. We were using For further testing, I also tried podman on my local (Macbook), which was running podman v5.0.3 installed via brew. I then installed podman v5.1.1 via brew. And the test results are what I posted above. @rhatdan , here is what I get from my Mac, now running v5.1.1 from brew:
Did something change with packaging for both these methods (quay.io repository and brew)? |
see #22813 This was a packaging bug as zstd:chunked should only be enabled on fedora 41, so this will be fixed next time the machine image is rebuild |
Issue Description
When building an image using the format flag,
podman build --format=docker
produces an image with ManifestTypeapplication/vnd.docker.distribution.manifest.v2+json
.Building is working as expected, but pushing is showing new behavior.
As of podman 5.0.3,
podman push
for this image preserved the type:application/vnd.docker.distribution.manifest.v2+json
As of podman 5.1.0 (also reproduced in latest version 5.1.1),
podman push
is overwriting the type:application/vnd.oci.image.manifest.v1+json
Is this a bug? Or new design?
Steps to reproduce the issue
Will show steps for both podman 5.0.3 and 5.1.1:
podman 5.0.3 shows expected behavior
$ podman version
$ ls
$ cat Dockerfile
$ podman build --format=docker -t docker.intuit.com/personal/rshiao/sample20240610:podman-5.0.3 .
$ podman images
$ podman inspect docker.intuit.com/personal/rshiao/sample20240610:podman-5.0.3
$ podman push docker.intuit.com/personal/rshiao/sample20240610:podman-5.0.3
$ podman image rm docker.intuit.com/personal/rshiao/sample20240610:podman-5.0.3
$ podman images
$ podman pull docker.intuit.com/personal/rshiao/sample20240610:podman-5.0.3
$ podman images
$ podman inspect docker.intuit.com/personal/rshiao/sample20240610:podman-5.0.3
podman 5.1.1 shows new behavior
$ podman version
$ ls
$ cat Dockerfile
$ podman build --format=docker -t docker.intuit.com/personal/rshiao/sample20240610:podman-5.1.1 .
$ podman images
$ podman inspect docker.intuit.com/personal/rshiao/sample20240610:podman-5.1.1
$ podman push docker.intuit.com/personal/rshiao/sample20240610:podman-5.1.1
$ podman image rm docker.intuit.com/personal/rshiao/sample20240610:podman-5.1.1
$ podman images
$ podman pull docker.intuit.com/personal/rshiao/sample20240610:podman-5.1.1
$ podman images
$ podman inspect docker.intuit.com/personal/rshiao/sample20240610:podman-5.1.1
Describe the results you received
As of podman 5.1.0 (also reproduced in latest version 5.1.1),
podman push
is overwriting the type:application/vnd.oci.image.manifest.v1+json
Describe the results you expected
As of podman 5.0.3,
podman push
for this image preserved the type:application/vnd.docker.distribution.manifest.v2+json
Was expecting the same behavior in later versions of podman as well.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: