From e32ca8b9b0bef41ed7acd4365dec73555eaa3195 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 7 Sep 2023 13:31:36 +0200 Subject: [PATCH 1/3] moved to bullseye-slim as base image, added dpkg-sig --- dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dockerfile b/dockerfile index e9d0702..016619b 100644 --- a/dockerfile +++ b/dockerfile @@ -2,14 +2,14 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -FROM debian:stable-slim +FROM debian:bullseye-slim ARG DEBIAN_FRONTEND=noninteractive ARG GIT_COMMIT ARG VERSION ARG TIMESTAMP LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" \ -org.opencontainers.image.base.name="docker.io/debian:stable-slim" \ +org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \ org.opencontainers.image.title=buildimage \ org.opencontainers.image.source="https://git.schmidl.dev/schtobia/buildimage" \ org.opencontainers.image.url="https://git.schmidl.dev/schtobia/buildimage" @@ -21,6 +21,7 @@ LABEL org.opencontainers.image.created=${TIMESTAMP} RUN apt update \ && apt install --assume-yes --no-install-recommends \ build-essential \ + dpkg-sig \ git \ && find /var/lib/apt -type f -delete From 7177edafd40ae52125d31891a096897f18af3a1d Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 7 Sep 2023 13:36:10 +0200 Subject: [PATCH 2/3] added a new user in the dockerfile --- dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 016619b..9f9a965 100644 --- a/dockerfile +++ b/dockerfile @@ -25,5 +25,8 @@ RUN apt update \ git \ && find /var/lib/apt -type f -delete -VOLUME /workdir +RUN useradd -rm builder + +USER builder + WORKDIR /workdir From f47146583ec44622b48c472f23aaba0ed4aff9a1 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 7 Sep 2023 13:36:54 +0200 Subject: [PATCH 3/3] moved the final label to the very bottom, since they will always change --- dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dockerfile b/dockerfile index 9f9a965..0f4b951 100644 --- a/dockerfile +++ b/dockerfile @@ -14,10 +14,6 @@ org.opencontainers.image.title=buildimage \ org.opencontainers.image.source="https://git.schmidl.dev/schtobia/buildimage" \ org.opencontainers.image.url="https://git.schmidl.dev/schtobia/buildimage" -LABEL org.opencontainers.image.revision=${GIT_COMMIT} -LABEL org.opencontainers.image.version=${VERSION} -LABEL org.opencontainers.image.created=${TIMESTAMP} - RUN apt update \ && apt install --assume-yes --no-install-recommends \ build-essential \ @@ -30,3 +26,7 @@ RUN useradd -rm builder USER builder WORKDIR /workdir + +LABEL org.opencontainers.image.revision=${GIT_COMMIT} +LABEL org.opencontainers.image.version=${VERSION} +LABEL org.opencontainers.image.created=${TIMESTAMP}