Add labels to docker image #162

Open
opened 2024-03-22 13:49:39 +00:00 by viceice · 5 comments
Member

We should add labels to the docker image. Especially org.opencontainers.image.source which is used by tools like renovate to find the source repo to fetch changelogs.

The following sample only works for me, because i've added a manual workaround.

We should add labels to the docker image. Especially `org.opencontainers.image.source` which is used by tools like renovate to find the source repo to fetch changelogs. The following sample only works for me, because i've added a manual workaround. - https://github.com/visualon/docker-images/pull/2515
viceice added the
Kind/Enhancement
label 2024-03-22 13:49:39 +00:00
Owner

do you know where to find the recommended set of labels that should be set?

do you know where to find the recommended set of labels that should be set?
Author
Member
https://github.com/opencontainers/image-spec/blob/main/annotations.md
Owner

is the close intentional @viceice ?

is the close intentional @viceice ?
viceice reopened this issue 2024-03-22 21:20:14 +00:00
Author
Member

no, wrong button 🙈

no, wrong button 🙈
Owner

See how it was done for Forgejo

LABEL maintainer="contact@forgejo.org" \
org.opencontainers.image.authors="Forgejo" \
org.opencontainers.image.url="https://forgejo.org" \
org.opencontainers.image.documentation="https://forgejo.org/download/#container-image" \
org.opencontainers.image.source="https://codeberg.org/forgejo/forgejo" \
org.opencontainers.image.version="${RELEASE_VERSION}" \
org.opencontainers.image.vendor="Forgejo" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.title="Forgejo. Beyond coding. We forge." \
org.opencontainers.image.description="Forgejo is a self-hosted lightweight software forge. Easy to install and low maintenance, it just does the job."

Watch out for the ARG line:

ARG RELEASE_VERSION

See how it was done for Forgejo https://code.forgejo.org/forgejo/forgejo/src/commit/d029796e1ed3966be1a9cb5c9d8b1cb190a2cdcf/Dockerfile#L56-L65 Watch out for the `ARG` line: https://code.forgejo.org/forgejo/forgejo/src/commit/d029796e1ed3966be1a9cb5c9d8b1cb190a2cdcf/Dockerfile#L55
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo/runner#162
No description provided.