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

Label images with opencontainers annotations #377

Open
xurizaemon opened this issue Feb 9, 2025 · 4 comments
Open

Label images with opencontainers annotations #377

xurizaemon opened this issue Feb 9, 2025 · 4 comments

Comments

@xurizaemon
Copy link
Contributor

xurizaemon commented Feb 9, 2025

Automated tools such as Renovate consult image labels to identify image provenance. By adding labels we may be able to better support use of those tools, eg Renovate would be better equipped to provide changelogs when proposing updates to Islandora images.

There are plenty of labels we could add - I don't want to spam the Dockerfiles, so I'll kick off a PR with only a couple.

Label key Description (source)
org.opencontainers.image.created date and time on which the image was built, conforming to RFC 3339.
org.opencontainers.image.authors contact details of the people or organization responsible for the image (freeform string)
org.opencontainers.image.url URL to find more information on the image (string)
org.opencontainers.image.documentation URL to get documentation on the image (string)
org.opencontainers.image.source URL to get source code for building the image (string)
org.opencontainers.image.version version of the packaged software
org.opencontainers.image.revision Source control revision identifier for the packaged software.
org.opencontainers.image.vendor Name of the distributing entity, organization or individual.
org.opencontainers.image.licenses License(s) under which contained software is distributed as an SPDX License Expression.
org.opencontainers.image.ref.name Name of the reference for a target (string).
org.opencontainers.image.title Human-readable title of the image (string)
org.opencontainers.image.description Human-readable description of the software packaged in the image (string)
org.opencontainers.image.base.digest Digest of the image this image is based on (string)
org.opencontainers.image.base.name Image reference of the image this image is based on (string)

We may also want to set the image Created property (as well as org.opencontainers.image.created Label?), but note discussion of caching in Slack thread.

@xurizaemon
Copy link
Contributor Author

Let me know if any other labels would be appreciated, happy to add them to the PR!

@joecorall
Copy link
Contributor

I commented in the PR #378 (comment)

@xurizaemon
Copy link
Contributor Author

From discussion in Slack, another user noted that the image Created property is set to time zero (1970-01-01):

$ docker inspect islandora/alpaca:3.1.4 | jq '.[].Created'
"1970-01-01T00:00:00Z"

$ docker inspect islandora/mariadb:3.1.4 | jq '.[].Created'
"1970-01-01T00:00:00Z"

$ docker inspect devwithlando/php:8.1-apache-4 | jq '.[].Created'
"2024-11-23T22:27:08.243456589Z"

Adding that to the issue description here also, have closed PR #378 as there is local WIP on this with Nigel, can revisit once that is landed if any items remain.

@nigelgbanks
Copy link
Contributor

That will be handled in the rework it relates to the caching invalidation. Previously I set

default = "0"
to 0 to reduce cache misses. Though recent features added to buildkit in the last few months will solve the caching issues so that this value can actually be used to reflect the age of the source code at time of image generation.

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

3 participants