From 70aa5bc2319cfc6f127d5a4c88676780abd05b85 Mon Sep 17 00:00:00 2001 From: Ruslan Mstoi Date: Mon, 29 May 2023 18:03:20 +0300 Subject: [PATCH] Dockerfile: remove unneeded files to free space Remove temporary, unneeded files in the docker image to save about 2.0M of space. Signed-off-by: Ruslan Mstoi --- resources/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/Dockerfile b/resources/Dockerfile index ecdf41957..e640dec46 100644 --- a/resources/Dockerfile +++ b/resources/Dockerfile @@ -54,7 +54,7 @@ RUN apt-get update \ dnsmasq \ dmsetup \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* /var/log/*log /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old RUN update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk @@ -66,7 +66,7 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \ libjson-glib-dev libgmp-dev libtasn1-dev python3-twisted \ net-tools softhsm2 \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/*; fi + && rm -rf /var/lib/apt/lists/* /var/log/*log /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old; fi RUN if [ "$TARGETARCH" = "arm64" ]; then \ # On AArch64, `setcap` binary should be installed via `libcap2-bin`. @@ -85,7 +85,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ perl \ texinfo \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/*; fi + && rm -rf /var/lib/apt/lists/* /var/log/*log /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old; fi # Fix the libssl-dev install RUN export ARCH="$(uname -m)" \