From eff2949947b9d2fbbb929ce5aed6bd692e6df958 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Tue, 24 Oct 2023 00:38:39 +0800 Subject: [PATCH] Properly upgrade packages and clean up apt cache in Dockerfile Result: ``` REPOSITORY TAG IMAGE ID CREATED SIZE ssh-audit after 03e247aee0cc About a minute ago 131MB ssh-audit before 609962ceafb1 About a minute ago 150MB ``` --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 75decec..26f7323 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM python:3-slim WORKDIR / # Update the image to remediate any vulnerabilities. -RUN apt clean && apt update && apt -y dist-upgrade && apt clean && rm -rf /var/lib/apt/lists/* +RUN apt update && apt -y upgrade && apt -y dist-upgrade && rm -rf /var/lib/apt/lists/* # Remove suid & sgid bits from all files. RUN find / -xdev -perm /6000 -exec chmod ug-s {} \; 2> /dev/null || true