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 annotations #124

Open
aaronmondal opened this issue Mar 26, 2024 · 1 comment
Open

Support annotations #124

aaronmondal opened this issue Mar 26, 2024 · 1 comment

Comments

@aaronmondal
Copy link

Annotations in the OCI spec may be used to add additional information to an image: https://github.com/opencontainers/image-spec/blob/main/annotations.md

We recently migrated from the builtin dockerTools to nix2container (TraceMachina/nativelink@1a43ef9). Just now did I notice that our annotations are no longer visible in the github actions tab.

Before migration:

https://github.com/TraceMachina/nativelink/pkgs/container/nativelink/192735920?tag=2bqf910c8d2g5b0l4gmrifq1xbvxfdmg

After migration:

https://github.com/TraceMachina/nativelink/pkgs/container/nativelink/193042543?tag=symgcw9plncfbp18vizjhzl8nfknbkgr

It looks like the config.Labels section behaves slightly differently between the two.

dockerTools adds the labels to the manifest, visible with docker manifest inspect someimage, while nix2container adds it to the Config section in the output of docker image inspect someimage.

AFAIU the behavior of dockerTools is actually incorrect as the annotations shouldn't live in config but in a separate annotations field instead: https://github.com/opencontainers/image-spec/blob/main/manifest.md#image-manifest-property-descriptions

Would it be possible/sensible to add an annotations field to buildImage and friends?

@nlewo
Copy link
Owner

nlewo commented Apr 4, 2024

Hello @aaronmondal ,

Would it be possible/sensible to add an annotations field to buildImage and friends?

Such kind of contributions would be welcomed (i've not planned to implement it soon).

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

2 participants