chore: add OCI standard labels to Dockerfile templates#2570
Open
Erwan-loot wants to merge 2 commits intonextcloud:masterfrom
Open
chore: add OCI standard labels to Dockerfile templates#2570Erwan-loot wants to merge 2 commits intonextcloud:masterfrom
Erwan-loot wants to merge 2 commits intonextcloud:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds OCI (Open Container Initiative) standard image labels to the Debian and Alpine Dockerfile templates to improve published image metadata in registries without changing build/runtime behavior.
Changes:
- Add an OCI
LABELblock toDockerfile-debian.template(title, description, url, source, documentation, vendor, licenses, version). - Add the same OCI
LABELblock toDockerfile-alpine.template. - Reuse the existing
%%VERSION%%template substitution performed byupdate.sh(no script changes required).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Dockerfile-debian.template | Adds OCI standard labels near the end of the template, using %%VERSION%% for org.opencontainers.image.version. |
| Dockerfile-alpine.template | Adds the same OCI standard labels near the end of the template, using %%VERSION%% for org.opencontainers.image.version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f6293ea to
17c2c59
Compare
Signed-off-by: Erwan Hervé <62173453+Erwan-loot@users.noreply.github.com>
Signed-off-by: Erwan Hervé <62173453+Erwan-loot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Add OCI (Open Container Initiative) standard labels to
Dockerfile-debian.templateandDockerfile-alpine.templatefor better image metadata and container registry compatibility.Type
Improvement — metadata only, no functional changes.
Labels Added
org.opencontainers.image.titleNextcloudorg.opencontainers.image.descriptionA safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.org.opencontainers.image.urlhttps://nextcloud.comorg.opencontainers.image.sourcehttps://github.com/nextcloud/dockerorg.opencontainers.image.documentationhttps://hub.docker.com/_/nextcloudorg.opencontainers.image.vendorNextcloud GmbHorg.opencontainers.image.licensesAGPL-3.0-or-laterorg.opencontainers.image.version%%VERSION%%→ e.g.33.0.2sedsubstitution)The
%%VERSION%%placeholder is already used inENV NEXTCLOUD_VERSION %%VERSION%%and is replaced globally byupdate.sh, so it works in theLABELinstruction with no changes required toupdate.sh.The LABEL block is placed after the final
COPYinstructions and beforeENTRYPOINT, which avoids cache invalidation for the expensive build steps above.Benefits
org.opencontainers.image.sourceto link release notes in update PRsChanges
Dockerfile-debian.template— added 8-label LABEL block beforeENTRYPOINTDockerfile-alpine.template— added 8-label LABEL block beforeENTRYPOINTThe generated Dockerfiles (
32/,33/×apache/fpm/fpm-alpine) will be automatically updated on the next run ofupdate.sh(triggered by theupdate-sh.ymlCI workflow after merge).How to verify
After image build:
References
Signed-off-by: Erwan Hervé erwan.herve+claude@outlook.fr