-
Notifications
You must be signed in to change notification settings - Fork 242
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
spin registry push container image metadata #2236
Comments
Let me see if I can elicit a scope / functional spec here, because I am not sure how closely this needs to follow Docker. To literally follow Docker we would need:
But another approach would be:
The latter would be considerably easier; admittedly the UI would be less convenient but maybe this is mostly done from CI where it doesn't matter? |
The first approach (new section in spin.toml, support for overriding at time of publish) brings a host of design/UX questions as this would be the first instance of capturing registry/publishing-related data in a Spin app's build document. I can imagine some other values that may be handy to store there (or near) like a default registry reference, etc... but all of this is to say that it probably warrants a wider discussion (and perhaps a SIP?) I'd also be curious if the latter approach (publish-time metadata injection) might suffice for the needs here? Would the metadata be used in any other registry commands besides |
For my particular case, the metadata is informational only, and a push time only way is enough. I do not have enough experience to comment about other use cases. PS I'm also not sure how to name the argument. Whether it should be metadata, annotation, label, or something else. Maybe its name should be aligned with the oci image artifact specification? |
FWIW, In the context of the OCI image spec, the correct name seems to the annotations instead of metadata. So probably, should be implemented as, e.g.: spin registry push \
--annotation org.opencontainers.image.description="Example Spin HTTP Application written in TypeScript" \
--annotation org.opencontainers.image.licenses="ISC" An example of the image can be seen at https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest, which boils down to: {
"annotations": {
"com.example.key1": "value1",
"com.example.key2": "value2"
}
} |
BTW, if you point me in the right direction, I would like to try to implement this :-) |
@rgl the
Let us know if we can be of further help. |
Thank You! Got it working at #2254! :-) |
At https://github.com/rgl/spin-http-ts-example/tree/test-release I'm building an example container image. When I build a container image with docker build, I can set container image metadata with:
And build/push it with:
And the image endsup with the expected metadata, like in https://github.com/rgl/spin-http-ts-example/pkgs/container/spin-http-ts-example/169177958?tag=0.1.0-rc3.
But when using
spin registry push
no metadata is sent, like in https://github.com/rgl/spin-http-ts-example/pkgs/container/spin-http-ts-example/169178514?tag=0.1.0-rc5.So, can we please have a way to set metadata?
The text was updated successfully, but these errors were encountered: