watchtower icon indicating copy to clipboard operation
watchtower copied to clipboard

Add OCI image labels

Open Qup42 opened this issue 1 year ago • 0 comments

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.

Qup42 avatar Feb 06 '24 18:02 Qup42