watchtower
watchtower copied to clipboard
Add OCI image labels
This PR adds Labels to the Docker Image. The added Labels conform to the Annotations defined in the OCI Image Format Specification. The following labels are added for releases (dev and tagged):
-
org.opencontainers.image.url
-
org.opencontainers.image.documentation
-
org.opencontainers.image.source
-
org.opencontainers.image.licenses
-
org.opencontainers.image.title
-
org.opencontainers.image.description
-
org.opencontainers.image.base.name
Tagged releases are additionally labeled with
-
org.opencontainers.image.created
-
org.opencontainers.image.version
-
org.opencontainers.image.revision
Image Labels are considered a best practice for Container Images. They make it easier to handle Images and reconstruct which version one is running. Image Labels also enable tools for automatic dependency updates (like Renovate and Dependabot) to automatically retrieve and display Release Notes for an update.
I tested the changes locally with goreleaser release --skip-publish --skip-validate --rm-dist
. The images had the expected labels. There are no existing test suites that apply to this change.
Documentation updates are not required for this change.