From 16abbbc8469b7bc046f8b2f311db5d3167ce6a18 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 16 Mar 2022 17:50:46 +0530 Subject: [PATCH] build: remove cache while building container image Reduce size of the container image by removing the cache in deploy and devel container. Signed-off-by: Humble Chirammal --- deploy/cephcsi/image/Dockerfile | 2 ++ scripts/Dockerfile.devel | 2 ++ 2 files changed, 4 insertions(+) diff --git a/deploy/cephcsi/image/Dockerfile b/deploy/cephcsi/image/Dockerfile index c9adc5241..311c6f5be 100644 --- a/deploy/cephcsi/image/Dockerfile +++ b/deploy/cephcsi/image/Dockerfile @@ -33,6 +33,8 @@ RUN dnf -y install \ /usr/bin/cc \ make \ git \ + && dnf clean all \ + && rm -rf /var/cache/yum \ && true ENV GOROOT=${GOROOT} \ diff --git a/scripts/Dockerfile.devel b/scripts/Dockerfile.devel index e7d502426..33afbb8d4 100644 --- a/scripts/Dockerfile.devel +++ b/scripts/Dockerfile.devel @@ -29,6 +29,8 @@ RUN dnf -y install \ librados-devel \ librbd-devel \ && dnf -y update \ + && dnf clean all \ + && rm -rf /var/cache/yum \ && true WORKDIR "/go/src/github.com/ceph/ceph-csi"