Skip to content
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

Support images without tags #511

Open
amluto opened this issue Oct 26, 2023 · 4 comments
Open

Support images without tags #511

amluto opened this issue Oct 26, 2023 · 4 comments

Comments

@amluto
Copy link

amluto commented Oct 26, 2023

podman save --format=oci-dir does not appear to produce an org.opencontainers.image.ref.name annotation in index.json, but it does produce a "config" with the same hash that it uses through the podman CLI to refer to the image.

It would be nice if umoci had some way to list configs in the image and to unpack an OCI dir produced by podman. If I hack up index.json to have a ref.name, then umoci seem to be able to use it, but I don't see any way to do this using umoci without manually editing index.json.

I could imagine umoci tag gaining functionality for this or for the --image parameter to more generally gain the ability to refer to untagged images.

@cyphar
Copy link
Member

cyphar commented Oct 29, 2023

What should the format look like? --image foo@sha256:...?

For operations that just take a tag, I suspect we will need to be careful to not make it impossible to create valid tags. I guess we would use a character not allowed to be in tags per the spec.

The operations that "update" images (repack, config, insert) will also need to have a way to provide the user the new hash (we cannot update the old tag if you are providing the has specifically).

@amluto
Copy link
Author

amluto commented Oct 29, 2023

I'm wondering if this is less important than I imagined, given the response to my bug against podman. I'm going to try to get podman's documentation improved.

Maybe no competent tool actually generates these problematic OCI structures.

@tych0
Copy link
Member

tych0 commented Oct 29, 2023

Yeah, IMO it is kind of strange to generate an image without a top level tag.

@cyphar
Copy link
Member

cyphar commented Nov 28, 2024

I think it would be useful to be able to specify the hash of the manifest to deal with those kinds of problematic images, but we would need to make sure that trying to do umoci repack (and similar operations) would fail unless you specify --tag. I don't think it'll be useful for most regular users though (in theory it would be useful for pinning hashes, but you can do that when pulling as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants