From 36a84276a20d418105ee973b5960ea79f7635018 Mon Sep 17 00:00:00 2001 From: Casey Link Date: Wed, 28 Aug 2024 22:57:58 +0200 Subject: [PATCH] Add OCI source annotation to link back to source repo (#701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add OCI source annotation to link back to source repo This commit adds the `org.opencontainers.image.source` label to the built container images. This label is helpful for tools to be able to link back from the container image to the source repo. For example, for those that use Renovate to help auto update dependencies, this will result in the latest releases release notes/changelog being included in the PR which is very handy! * move label to base image --------- Co-authored-by: Sascha Ißbrücker --- docker/alpine.Dockerfile | 1 + docker/default.Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/docker/alpine.Dockerfile b/docker/alpine.Dockerfile index b81f118..c782c7c 100644 --- a/docker/alpine.Dockerfile +++ b/docker/alpine.Dockerfile @@ -69,6 +69,7 @@ RUN wget https://www.sqlite.org/${SQLITE_RELEASE_YEAR}/sqlite-amalgamation-${SQL FROM python:3.11.8-alpine3.19 AS linkding +LABEL org.opencontainers.image.source="https://github.com/sissbruecker/linkding" # install runtime dependencies RUN apk update && apk add bash curl icu libpq mailcap libssl3 # create www-data user and group diff --git a/docker/default.Dockerfile b/docker/default.Dockerfile index 7b6fd39..cacdb3b 100644 --- a/docker/default.Dockerfile +++ b/docker/default.Dockerfile @@ -71,6 +71,7 @@ RUN wget https://www.sqlite.org/${SQLITE_RELEASE_YEAR}/sqlite-amalgamation-${SQL FROM python:3.11.8-slim-bookworm as linkding +LABEL org.opencontainers.image.source="https://github.com/sissbruecker/linkding" RUN apt-get update && apt-get -y install mime-support libpq-dev libicu-dev libssl3 curl WORKDIR /etc/linkding # copy prod dependencies