-
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 manifest create for image list/index produces docker v2s2 format only #21294
Comments
@nalind PTAL |
The original implementation created v2s2 because the OCI format didn't include a MediaType field, so an empty OCI index was hard to guess the MIME type for. When we modify one, by adding or annotating, though, the format used to save it should switch to OCI if any fields that only exist in OCI are populated. |
A friendly reminder that this issue had no activity for 30 days. |
So in order to get OCI manifest one needs to annotate or add items to the manifest that are OCI-specific in order to enforce a switch to the OCI index format? But the moment we push it to registry it might still be converted back to docker ones? |
Why we still have this issue open, and the priority wasn't raised yet? Something is really bad with Podman and I lost trust from using it. Currently only Docker is the stable solution. We have pushed OCI-based image index and manifests, and Podman returns wrong results about media type of image index:
Only Docker returns the media type correctly:
|
I've opened a new issue about it, because we have experienced that issue with pulling via Podman only: #22196 |
Hi, any update/estimate for this issue?
when using
|
creating manifest manually
(why explicitly docker?) then running
|
Issue Description
Currently when podman is used to build a container image, you can specify image format as 'oci' (v1) or 'docker' (v2s2). But this applies to images only, not the image list/index manifest creation.
You can easily build an image using docker format generating parameter (default)
podman build --format docker --manifest test-docker .
as this produces:while running oci format build
podman build --format oci --manifest test-oci .
yields:so this works great for specific images.
However, once you add multi-platform image builds or multi-image list/index manifest creation into the picture the situation is different, as you always end up with:
regardless if you run
podman build --platform linux/amd64,linux/arm64 --format oci --manifest test-oci .
orpodman build --platform linux/amd64,linux/arm64 --format docker --manifest test-docker .
, which may be expected aspodman build --format
call is specific to the images, not the list/index manifest creation.However, there's no option to actually "init" the multi-image manifest as either docker-format list or oci-format index as manifest creation command yields docker v2s2-only artifacts.
As such, you end up with either all-docker compliant format (default, when explicitly requesting docker format) or a mixed-bag when requesting OCI-format even if you request/want to get OCI-specific outputs.
Steps to reproduce the issue
podman build --platform linux/amd64,linux/arm64 --format oci --manifest test-oci .
expecting OCI format for both images and image list/index.podman manifest create test-2
podman build
command) to "enforce" OCI-format:Describe the results you received
If you check the mediaType of the manifests you'll see they are docker-type only:
podman build
command) to "enforce" OCI-format since that is not yet supported:podman manifest create --format oci test-3 Error: unknown flag: --format See 'podman manifest create --help'
Describe the results you expected
When creating new manifest list/index with OCI requested format in the image build use OCI-specific index with mediaType of
application/vnd.oci.image.index.v1+json
(OCI vs docker multi-image manifests) instead ofapplication/vnd.docker.distribution.manifest.list.v2+json
.Do not change mediaType/format of the preexisting index/list when adding images to some existing one (this I believe is the current approach when using
podman manifest append
).When creating new manifest from scratch using
podman manifest create
support generation of OCI index type through an exposed optional--format
parameter, same as for image build command.podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Using WSL2 with Alma Linux 9 distribution.
Additional information
Issue happens for all requested OCI-format multi-platform builds.
The text was updated successfully, but these errors were encountered: