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 <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2022-03-16 17:50:46 +05:30 committed by mergify[bot]
parent f6ae612003
commit 16abbbc846
2 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,8 @@ RUN dnf -y install \
/usr/bin/cc \ /usr/bin/cc \
make \ make \
git \ git \
&& dnf clean all \
&& rm -rf /var/cache/yum \
&& true && true
ENV GOROOT=${GOROOT} \ ENV GOROOT=${GOROOT} \

View File

@ -29,6 +29,8 @@ RUN dnf -y install \
librados-devel \ librados-devel \
librbd-devel \ librbd-devel \
&& dnf -y update \ && dnf -y update \
&& dnf clean all \
&& rm -rf /var/cache/yum \
&& true && true
WORKDIR "/go/src/github.com/ceph/ceph-csi" WORKDIR "/go/src/github.com/ceph/ceph-csi"