From 7b16fd27b09e3132cc87427d311b8635436da570 Mon Sep 17 00:00:00 2001 From: Johannes Wienke Date: Sat, 13 Mar 2021 15:46:20 +0100 Subject: [PATCH 1/2] Include opencontainers labels in Docker image Cf. /~https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys Fixes #9611 Signed-off-by: Johannes Wienke --- changelog.d/9612.docker | 1 + docker/Dockerfile | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 changelog.d/9612.docker diff --git a/changelog.d/9612.docker b/changelog.d/9612.docker new file mode 100644 index 000000000000..d95c503c8b1a --- /dev/null +++ b/changelog.d/9612.docker @@ -0,0 +1 @@ +Include [opencontainers labels](/~https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys) in the Docker image. diff --git a/docker/Dockerfile b/docker/Dockerfile index d619ee08ed82..7257fcdcf442 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,6 +18,11 @@ ARG PYTHON_VERSION=3.8 ### FROM docker.io/python:${PYTHON_VERSION}-slim as builder +LABEL org.opencontainers.image.url='https://matrix.org/docs/projects/server/synapse' +LABEL org.opencontainers.image.documentation='/~https://github.com/matrix-org/synapse/blob/master/INSTALL.md' +LABEL org.opencontainers.image.source='/~https://github.com/matrix-org/synapse.git' +LABEL org.opencontainers.image.licenses='Apache-2.0' + # install the OS build deps RUN apt-get update && apt-get install -y \ build-essential \ From 645840371015c54aeb33c83c53925123f675fcae Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 22 Mar 2021 14:50:37 +0000 Subject: [PATCH 2/2] Update docker/Dockerfile Co-authored-by: Johannes Wienke --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7257fcdcf442..af13f8f680cd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,7 +19,7 @@ ARG PYTHON_VERSION=3.8 FROM docker.io/python:${PYTHON_VERSION}-slim as builder LABEL org.opencontainers.image.url='https://matrix.org/docs/projects/server/synapse' -LABEL org.opencontainers.image.documentation='/~https://github.com/matrix-org/synapse/blob/master/INSTALL.md' +LABEL org.opencontainers.image.documentation='/~https://github.com/matrix-org/synapse/blob/master/docker/README.md' LABEL org.opencontainers.image.source='/~https://github.com/matrix-org/synapse.git' LABEL org.opencontainers.image.licenses='Apache-2.0'