View labels/annotations of container registry images
Description
Note, the label discussed in this issue is not at all related to GitLab labels.
Docker images can have one or more "LABEL" applied which can provide useful metadata about the image. To view these labels, one currently has to pull the image, then locally inspect it.
It would be very valuable if these labels could be inspected from GitLab's UI.
Apart from Docker LABELs, the same applied to OCI annotations (https://github.com/opencontainers/image-spec/blob/main/annotations.md).
Proposal
Provide a way to view all labels via the GitLab UI.
From the docker docs:
To view an image’s labels, use the docker inspect command.
"Labels": { "com.example.vendor": "ACME Incorporated" "com.example.label-with-value": "foo", "version": "1.0", "description": "This text illustrates that label-values can span multiple lines.", "multi.label1": "value1", "multi.label2": "value2", "other": "value3" },
Similar support should exist for OCI images, following https://github.com/opencontainers/image-spec/blob/main/annotations.md.
Further Details
Another idea is to have some type of support for scoped labels to give the registry UI view more structure, but allow users to control that simple structure.
- label scopes like ".heading-ACMECustomAttributes.something" could be displayed under a heading "ChocolateyAttributes"
- label scopes like ".heading-ACMECustomAttributes.collapsed" could cause the associated heading to be collapsed in the UI
- label scopes could support a limited set of data types like ".url" could make clickable links (assuming data is treated securely)
"Labels": {
"heading-ACMECustomAttributes.collapsed": "true",
"heading-ACMECustomAttributes.Company": "ACME Corporation",
"heading-ACMECustomAttributes.Description": "ABC Application",
"heading-ACMECustomAttributes.Version": "v1.3.0",
"heading-ACMECustomAttributes.Source.url": "https://acmecorporation.com/downloads"
}
If it was kept simple it could provide some useful UI capabilities without code updates to GitLab.
Links / references
https://docs.docker.com/engine/reference/builder/#label
Documentation blurb
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
- Feature assurance
- Documentation
- Added to features.yml