From e48e03d2c6c0770b310868ebe03657263903cbeb Mon Sep 17 00:00:00 2001 From: Eero Tamminen Date: Thu, 9 Jan 2025 12:58:47 +0200 Subject: [PATCH] Review comment: add autoclean/autoremove It's not really needed in this case, but does not harm either, and can be useful if somebody copy-pastes it to container having more complex deps, or one using image based on non-stable distro. Signed-off-by: Eero Tamminen --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9b6ad7d07..b1db30c72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,9 @@ RUN useradd -m -s /bin/bash user && \ # get security updates RUN apt-get update && apt-get upgrade -y && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + apt-get clean autoclean && \ + apt-get autoremove -y && \ + rm -rf /var/lib/apt/lists/* WORKDIR $HOME