From 04af2a25d26c72969e4fcb27c75201c3dbfcdf34 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Mon, 18 Mar 2019 15:40:25 +0800 Subject: [PATCH] Remove `apt-get clean` in Dockerfile.{jetty,tomcat} Also manually cleaned up `/var/lib/apt/lists` in original commits but got conflict with #97, then removed. Ref: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ > In addition, when you clean up the apt cache by removing > /var/lib/apt/lists it reduces the image size, since the apt cache is not > stored in a layer. > Official Debian and Ubuntu images automatically run apt-get clean, > so explicit invocation is not required. --- Dockerfile.jetty | 2 +- Dockerfile.tomcat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.jetty b/Dockerfile.jetty index f2f882fd..cfc70439 100644 --- a/Dockerfile.jetty +++ b/Dockerfile.jetty @@ -15,7 +15,7 @@ USER root RUN apt-get update && \ apt-get install -y --no-install-recommends graphviz fonts-noto-cjk && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* USER jetty diff --git a/Dockerfile.tomcat b/Dockerfile.tomcat index 255c9d00..a816a3cf 100644 --- a/Dockerfile.tomcat +++ b/Dockerfile.tomcat @@ -28,7 +28,7 @@ MAINTAINER D.Ducatel RUN apt-get update && \ apt-get install -y --no-install-recommends fonts-noto-cjk libexpat1 libcairo2 libpango1.0 libpangoft2-1.0 libpangocairo-1.0 && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* ENV GRAPHVIZ_DOT=/usr/bin/dot