chore: add OCI standard labels to Dockerfile - #51
Open
Erwan-loot wants to merge 1 commit into
Open
Conversation
Owner
|
Thanks for sharing this, will read up on OCI before taking any action. |
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 the
Dockerfilefor better image metadata and container registry compatibility.Type
Improvement — metadata only, no functional changes.
Labels Added
org.opencontainers.image.titlemazanokeorg.opencontainers.image.descriptionA self-hosted local image optimizer that runs in your browserorg.opencontainers.image.urlhttps://github.com/civilblur/mazanokeorg.opencontainers.image.sourcehttps://github.com/civilblur/mazanokeorg.opencontainers.image.vendorcivilblurorg.opencontainers.image.licensesGPL-3.0-onlyorg.opencontainers.image.version${VERSION}org.opencontainers.image.revision${REVISION}org.opencontainers.image.created${CREATED}The three dynamic labels (
version,revision,created) use optional build args — the image builds fine without them, they'll simply be empty. When you add CI/CD for automated builds, you can wire them up like so:Benefits
org.opencontainers.image.sourceto locate and display changelogs in update PRs — users who self-host mazanoke via Docker will see release notes when updates landrevisionandcreatedallow precise auditing of which source commit produced an imageChanges
Dockerfile: addedARG VERSION,ARG REVISION,ARG CREATEDand aLABELblock in the finalnginx:alpinestage, placed after the lastCOPYand beforeEXPOSEReferences