From ca8b15254901b0bb636225dc2205b7cc167306ff Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 18 Mar 2021 11:33:54 +0800 Subject: [PATCH] Remove unnecessary apt-get clean in Dockerfile (#9201) This image is built from the official Debian image as upstream, so there is no need to do apt-get clean manually. Ref: - docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get > Official Debian and Ubuntu images automatically run apt-get clean, so > explicit invocation is not required. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 35680b161c..130c901ea4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ FROM ubuntu:bionic LABEL maintainer Brady Wetherington +# No need to add `apt-get clean` here, reference: +# - https://github.com/snipe/snipe-it/pull/9201 +# - https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get + RUN export DEBIAN_FRONTEND=noninteractive; \ export DEBCONF_NONINTERACTIVE_SEEN=true; \ echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \ @@ -37,7 +41,6 @@ libmcrypt-dev \ php7.2-dev \ ca-certificates \ unzip \ -&& apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*