From 73b74c94a18edac8e8920d7c95c9cc91664f4c64 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 2 Nov 2021 14:15:46 -0700 Subject: [PATCH] remove unnecessary RPMs to reduce security reports (#13565) --- Dockerfile.release | 6 ++++-- Dockerfile.release.fips | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile.release b/Dockerfile.release index 9579922c0..2d059aa10 100644 --- a/Dockerfile.release +++ b/Dockerfile.release @@ -27,8 +27,9 @@ COPY CREDITS /licenses/CREDITS COPY LICENSE /licenses/LICENSE RUN \ + microdnf clean all && \ microdnf update --nodocs && \ - microdnf install curl ca-certificates shadow-utils util-linux iproute iputils --nodocs && \ + microdnf install curl ca-certificates shadow-utils --nodocs && \ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ microdnf install minisign --nodocs && \ mkdir -p /opt/bin && chmod -R 777 /opt/bin && \ @@ -39,7 +40,8 @@ RUN \ chmod +x /opt/bin/minio && \ chmod +x /usr/bin/docker-entrypoint.sh && \ chmod +x /usr/bin/verify-minio.sh && \ - /usr/bin/verify-minio.sh + /usr/bin/verify-minio.sh && \ + microdnf clean all EXPOSE 9000 diff --git a/Dockerfile.release.fips b/Dockerfile.release.fips index c29942ecd..f83538e21 100644 --- a/Dockerfile.release.fips +++ b/Dockerfile.release.fips @@ -27,8 +27,9 @@ COPY CREDITS /licenses/CREDITS COPY LICENSE /licenses/LICENSE RUN \ + microdnf clean all && \ microdnf update --nodocs && \ - microdnf install curl ca-certificates shadow-utils util-linux iproute iputils --nodocs && \ + microdnf install curl ca-certificates shadow-utils --nodocs && \ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ microdnf install minisign --nodocs && \ mkdir -p /opt/bin && chmod -R 777 /opt/bin && \ @@ -39,7 +40,8 @@ RUN \ chmod +x /opt/bin/minio && \ chmod +x /usr/bin/docker-entrypoint.sh && \ chmod +x /usr/bin/verify-minio.sh && \ - /usr/bin/verify-minio.sh + /usr/bin/verify-minio.sh && \ + microdnf clean all EXPOSE 9000