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

OCI images with annotations? #844

Closed
srenatus opened this issue Oct 11, 2022 · 5 comments
Closed

OCI images with annotations? #844

srenatus opened this issue Oct 11, 2022 · 5 comments

Comments

@srenatus
Copy link
Contributor

srenatus commented Oct 11, 2022

Hello!

I'm trying to consume a ko-built OCI image from another tool, and that one depends on having a tag, i.e. org.opencontainers.image.ref.name in the annotations of the OCI archive.

Having dug around a bit, that seems like it's not possible right now? I would have hoped that the --tags flag together with --oci-layout-path would do the trick, but it doesn't seem to 🤔

(See https://github.com/opencontainers/image-spec/blob/main/image-layout.md#indexjson-file)

@jonjohnsonjr
Copy link
Collaborator

jonjohnsonjr commented Oct 11, 2022

I believe this already works except for publishing manifest lists. If your base image is an OCI image index and you're pushing an index, it will contain annotations. If your base image is a manifest list (per docker media types), it will publish a manifest list without annotations.

Oh I misread, I was thinking about org.opencontainers.image.base.name.

Do you expect org.opencontainers.image.ref.name to contain just a tag? Or a full image ref?

@srenatus
Copy link
Contributor Author

I'm not sure, I'll have to check... Just had it fail without anything set so far... I'll get back to you

@srenatus
Copy link
Contributor Author

FWIW adding the annotation, and using a recent-enough ko version (it seems distroless.dev/ko didn't have #776) made it work out fine: https://github.com/srenatus/opa-x/blob/main/ko.bass. There, I'm just adding a "latest" ref name, because it's enough to make it work.

@developer-guy
Copy link
Collaborator

Hello @srenatus, is this problem can be related to this one?

#870

@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants