Support annotations
aaronmondal opened this issue · 1 comments
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:
After migration:
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?
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).