Skip to content

Add OpenContainers labels to Dockerfile.release#5523

Merged
MichaelEischer merged 1 commit into
restic:masterfrom
tobiaskarch:patch-1
Sep 24, 2025
Merged

Add OpenContainers labels to Dockerfile.release#5523
MichaelEischer merged 1 commit into
restic:masterfrom
tobiaskarch:patch-1

Conversation

@tobiaskarch

@tobiaskarch tobiaskarch commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

What does this PR change? What problem does it solve?

This PR adds some labels from the OpenContainers Annotations Spec to the Dockerfile.release file.

My main motivation for this change is the org.opencontainers.image.source label which allows Renovate to show the restic changelog and link to the restic repository when creating a PR: https://docs.renovatebot.com/key-concepts/changelogs/#how-renovate-detects-changelogs https://docs.renovatebot.com/modules/datasource/docker/ (see "Source URL support")

However, the metadata can of course also be useful for other services.

Tested with:

  • podman build -t test -f docker/Dockerfile.release --platform linux/amd64 .
  • podman image inspect --format='{{json .Config.Labels}}' test

Output:

{"io.buildah.version":"1.41.4","org.opencontainers.image.description":"Fast, secure, efficient backup program","org.opencontainers.image.documentation":"https://restic.readthedocs.io","org.opencontainers.image.source":"https://github.com/restic/restic","org.opencontainers.image.title":"restic","org.opencontainers.image.url":"https://restic.net"}

Was the change previously discussed in an issue or on the forum?

No

Checklist

  • I have added tests for all code changes. -> no code changes
  • I have added documentation for relevant changes (in the manual). -> no documentation necessary
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

@tobiaskarch tobiaskarch marked this pull request as ready for review September 22, 2025 17:45

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice! Thanks.

@MichaelEischer MichaelEischer merged commit d52f92e into restic:master Sep 24, 2025
11 checks passed
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

Successfully merging this pull request may close these issues.

2 participants