From 848052df685204b25b4345c770da8d28deb9695e Mon Sep 17 00:00:00 2001 From: Oleksii Date: Mon, 23 Oct 2023 10:51:47 -0700 Subject: [PATCH] Add cleanup for apt cache files (#215) * Add cleanup for apt cache files Adding this command decreases the size of the image. ssh-audit-new latest 0c391ba567ee 39 minutes ago 157MB ssh-audit-old latest a425e0043125 40 minutes ago 176MB * Fix Dockerfile Forgot to add logical "and" (&&) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 980fd35..75decec 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 +RUN apt clean && apt update && apt -y dist-upgrade && apt clean && 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