chore: workaround to fix dockle scan warning (#204)

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 <niccolo.fei@enterprisedb.com>
This commit is contained in:
Niccolò Fei
2025-05-26 11:05:15 +02:00
committed by GitHub
parent 09e421e06f
commit dc0d7b221b

View File

@@ -31,9 +31,9 @@ COPY requirements.txt /
# Install additional extensions # Install additional extensions
RUN set -xe; \ RUN set -xe; \
apt-get update; \ 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!"; \ echo "ERROR: Upgradable postgres packages found!"; \
apt list --upgradable 2>/dev/null | grep '^postgres'; \ apt-get -s upgrade | grep "^Inst postgres"; \
exit 1; \ exit 1; \
fi; \ fi; \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \