From 2a5244949c48d254cb9c75ba271ad8aba12c1242 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Thu, 20 Aug 2026 12:05:47 +0200 Subject: [PATCH 1/2] fix: run apt-get upgrade in Dockerfile This brings in the latest security updates from Debian when building the image. Fixes #494 Signed-off-by: Peter A. Jonsson --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0b8b2a0c5..2ff3a214a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ ARG PG_MAJOR ENV PATH=$PATH:/usr/lib/postgresql/$PG_MAJOR/bin RUN apt-get update && \ + apt-get upgrade -y && \ apt-get install -y --no-install-recommends postgresql-common ca-certificates gnupg && \ /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y -c "${PG_MAJOR}" && \ apt-get install -y --no-install-recommends -o Dpkg::::="--force-confdef" -o Dpkg::::="--force-confold" postgresql-common && \ @@ -26,6 +27,7 @@ ARG EXTENSIONS ARG STANDARD_ADDITIONAL_POSTGRES_PACKAGES USER root RUN apt-get update && \ + apt-get upgrade -y && \ apt-get install -y --no-install-recommends locales-all ${STANDARD_ADDITIONAL_POSTGRES_PACKAGES} ${EXTENSIONS} && \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \ rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/* @@ -40,6 +42,7 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 USER root RUN apt-get update && \ + apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ # We require build-essential and python3-dev to build lz4 on arm64 since there isn't a pre-compiled wheel available build-essential python3-dev \ From ef2b217a27f1e791b8d6c6a3704cf1e834d2a1ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Fri, 4 Sep 2026 16:09:53 +0200 Subject: [PATCH 2/2] fix: upgrade only on the minimal layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Other layers build on top of minimal, so running the upgrade on the first minimal layer is enough. Signed-off-by: Niccolò Fei --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ff3a214a..6c0b7e335 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,6 @@ ARG EXTENSIONS ARG STANDARD_ADDITIONAL_POSTGRES_PACKAGES USER root RUN apt-get update && \ - apt-get upgrade -y && \ apt-get install -y --no-install-recommends locales-all ${STANDARD_ADDITIONAL_POSTGRES_PACKAGES} ${EXTENSIONS} && \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \ rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/* @@ -42,7 +41,6 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 USER root RUN apt-get update && \ - apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ # We require build-essential and python3-dev to build lz4 on arm64 since there isn't a pre-compiled wheel available build-essential python3-dev \