From 9f1d4b78ccea7c41b1d14a8c21957a2a8a5a9457 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 18 Feb 2020 20:33:10 -0500 Subject: [PATCH] Dockerfile: Clear yum cache after install Not clearing the cache increased the image size by about 50M --- Dockerfile | 2 +- Dockerfile.rhel7 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 33739ffd2e..54ba1e0cc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY . . RUN hack/build-go.sh FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base -RUN yum install -y rsync +RUN yum install -y rsync && yum clean all && rm -rf /var/cache/yum COPY --from=builder /go/src/github.com/openshift/image-registry/_output/local/bin/dockerregistry /usr/bin/ COPY images/dockerregistry/config.yml / RUN chmod a+w -R /etc/pki/ca-trust/extracted diff --git a/Dockerfile.rhel7 b/Dockerfile.rhel7 index 5dad7facc8..f87afb494c 100644 --- a/Dockerfile.rhel7 +++ b/Dockerfile.rhel7 @@ -4,7 +4,7 @@ COPY . . RUN hack/build-go.sh FROM registry.svc.ci.openshift.org/ocp/4.0:base -RUN yum install -y rsync +RUN yum install -y rsync && yum clean all && rm -rf /var/cache/yum COPY --from=builder /go/src/github.com/openshift/image-registry/_output/local/bin/dockerregistry /usr/bin/ COPY images/dockerregistry/config.yml / RUN chmod a+w -R /etc/pki/ca-trust/extracted