From 2590c5ea2a99b1bf3122f53f10b85326b3c51a77 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Mon, 11 Jul 2022 10:33:50 -0400 Subject: [PATCH] Avoid installing weak dependencies. The following weak dependencies will end up not being installed. ``` apr-util-bdb apr-util-openssl geolite2-city geolite2-country libmaxminddb perl-Digest perl-Digest-MD5 perl-IO-Socket-IP perl-IO-Socket-SSL perl-libnet perl-Mozilla-CA perl-Net-SSLeay perl-URI python38-pip python3-jmespath rubygem-bundler rubygem-json rubygem-rdoc ``` This drops the image size roughly from 2.063GB to 1.943GB (120MB, 5.85%). Of note, the geolite2 packages are somewhat large, so part of #736 --- images/manageiq-base/Dockerfile | 4 ++-- images/manageiq-webserver-worker/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/manageiq-base/Dockerfile b/images/manageiq-base/Dockerfile index f495c2acd..10c41046b 100644 --- a/images/manageiq-base/Dockerfile +++ b/images/manageiq-base/Dockerfile @@ -45,7 +45,7 @@ COPY container-assets/clean_dnf_rpm /usr/local/bin/ RUN curl -L https://releases.ansible.com/ansible-runner/ansible-runner.el8.repo > /etc/yum.repos.d/ansible-runner.repo -RUN dnf -y --disableplugin=subscription-manager --setopt=tsflags=nodocs install \ +RUN dnf -y --disableplugin=subscription-manager --setopt=tsflags=nodocs --setopt=install_weak_deps=False install \ httpd \ mod_ssl && \ if [ ${ARCH} != "s390x" ] ; then \ @@ -62,7 +62,7 @@ RUN dnf -y --disableplugin=subscription-manager --setopt=tsflags=nodocs install if [[ "$RELEASE_BUILD" != "true" ]]; then dnf config-manager --enable manageiq-15-oparin-nightly; fi && \ dnf config-manager --setopt=ubi-8-*.exclude=dracut*,net-snmp*,perl-*,redhat-release* --save && \ if [[ "$LOCAL_RPM" = "true" ]]; then /create_local_yum_repo.sh; fi && \ - dnf -y --setopt=tsflags=nodocs install \ + dnf -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False install \ ${RPM_PREFIX}-pods \ python3-devel && \ clean_dnf_rpm && \ diff --git a/images/manageiq-webserver-worker/Dockerfile b/images/manageiq-webserver-worker/Dockerfile index b8de9f004..aa4567885 100644 --- a/images/manageiq-webserver-worker/Dockerfile +++ b/images/manageiq-webserver-worker/Dockerfile @@ -11,7 +11,7 @@ LABEL name="manageiq-webserver-worker" \ COPY container-assets/service-worker-entrypoint /usr/local/bin -RUN dnf -y --setopt=tsflags=nodocs install \ +RUN dnf -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False install \ ${RPM_PREFIX}-ui && \ clean_dnf_rpm && \ # Remove httpd default settings