-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add annotations support to OCI outputter #1220
Comments
kindly ping @tonistiigi, I can take care of this one, would you mind assigning it to me? |
One thing you need to think about is if these annotations are in the descriptors of image index(used for multi-platform builds) or in the image manifest. I'm not sure if even the spec authors had any idea what is correct there. |
Some more specific steps for this: Annotations should be settable by both client and a frontend. Client uses the output options that end up in https://github.com/moby/buildkit/blob/v0.10.3/client/solve.go#L49 and are passed to exporter in https://github.com/moby/buildkit/blob/v0.10.3/exporter/containerimage/export.go#L85 . Instead of using CSV inside CSV I think we can just let user define all annotations with unique key. In addition to that they should be settable by the frontend. Frontend would write a record If the image is multi-arch then all subimages get the annotation. To set annotation to a specific subimage inside multi-arch manifest the key would be Still not clear to me if all annotations should go to the descriptors in the manifest list(index) or some go to individual manifest. If we want to make this distinction I think we need to support both |
I think we could set some annotations automatically if a Git context is being used for example. Pretty much like the metadata-action does: https://github.com/docker/metadata-action/blob/8d56fe93cf3fd680736a906389438c1ed74d75f7/src/meta.ts#L442-L449 (minus the spdx ID, title and desc which is taken from GitHub API). |
@developer-guy are you still interested in this? I'd like to take this one if possible. |
Please go ahead @jedevc, I'm interested in as well but I'm always open to learn new things from your contributions 🙅♂️ |
The OCI image spec allows specifying
annotations
on index entries.I would like the ability to include annotations in my oci image output argument as in
--output type=oci,dest=/image.tar,annotations=org.opencontainers.image.ref.name=latest
and have it add these annotations.see also #1218 for related
The text was updated successfully, but these errors were encountered: