Closed OuesFa closed 8 months ago
At some point, the build process in https://github.com/docker-library/official-images should be adding these as proper OCI annotations, which is how I'd prefer to solve this (especially since LABEL
has unpleasant inheritance behavior).
Thanks for your answer.
Just to make sure I understand, what you are suggesting is not to add it in the Dockerfile of this repo but to add it elsewhere in a more generic way ? In the github actions workflow of https://github.com/docker-library/official-images?
If so, do you think it's something a newbie could make progress on? In which case I would be interested in a handy pointer to ease the task.
Also, I'm not sure I understand what the problem is with the inheritance behavior? Is it that all images based on it would also have the org.opencontainers.image.source
tag and that would be a problem?
For the first half, it would need to be part of bashbrew
itself, and is going to be a much larger change (it really requires buildx
/buildkit
to implement OCI annotations, and then bashbrew
to use them, which probably requires combining the build
/push
phases, so definitely not a small or easy task :grimacing:).
For the second half, yes, my main issue is that FROM cassandra:xxx
will still include our label unless the image author overrides it (where many won't even be aware it's happening or understand why they should care).
Ok thank you for your answer.
So if i understand correctly this label will not be available in the cassandra image anytime soon. I might have to think of a workaround to include the release notes in the PRs that renovate will open to update the cassandra image versions in my dockerfiles.
Proposal
Add the following OCI label
org.opencontainers.image.source
in the docker image to indicate the source repo URL.Use case. I'm using Renovate to update dependencies. Renovate supports docker label
org.opencontainers.image.source
to point to source and add the release notes in the created PR. I would like to leverage that for cassandra imagesI hope I'm on the right github repo for this need. FYI, I use a dockerfile with a simple
FROM
ExampleFROM cassandra:4.1.0