From a01ea9102888e7bb6ce338e36d04a2e1853c7bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Fri, 23 May 2025 17:07:24 +0200 Subject: [PATCH] chore: workaround to fix dockle scan warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dockle scans fail with an unrelated warning on dist-upgrade if you use both apt & apt-get in the same RUN step. As a workaround, let's use only apt-get. Signed-off-by: Niccolò Fei --- Debian/Dockerfile.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Debian/Dockerfile.template b/Debian/Dockerfile.template index 91304355..76ed00ca 100644 --- a/Debian/Dockerfile.template +++ b/Debian/Dockerfile.template @@ -31,9 +31,9 @@ COPY requirements.txt / # Install additional extensions RUN set -xe; \ apt-get update; \ - if apt list --upgradable 2>/dev/null | grep -q '^postgres'; then \ + if apt-get -s upgrade | grep "^Inst postgres"; then \ echo "ERROR: Upgradable postgres packages found!"; \ - apt list --upgradable 2>/dev/null | grep '^postgres'; \ + apt-get -s upgrade | grep "^Inst postgres"; \ exit 1; \ fi; \ apt-get install -y --no-install-recommends \