diff --git a/image/rhel/Dockerfile b/image/rhel/Dockerfile index ee6dd3e81fe95..0f29433fdf36b 100644 --- a/image/rhel/Dockerfile +++ b/image/rhel/Dockerfile @@ -55,11 +55,12 @@ RUN rpm --import RPM-GPG-KEY-CentOS-Official && \ microdnf -y upgrade --nobest && \ rpm -i --nodeps /tmp/postgres-libs.rpm && \ rpm -i --nodeps /tmp/postgres.rpm && \ - microdnf install --setopt=install_weak_deps=0 --nodocs -y lz4 bzip2 util-linux && \ microdnf clean all -y && \ rm /tmp/postgres.rpm /tmp/postgres-libs.rpm RPM-GPG-KEY-CentOS-Official && \ # (Optional) Remove line below to keep package management utilities - rpm -e --nodeps $(rpm -qa curl '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*') && \ + rpm -v -e $(rpm -qa curl '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*' \ + 'elfutils-libelf' 'gnupg2' 'gpgme' 'libarchive' 'libcurl' 'libmodulemd' 'librepo' \ + 'libudev' 'libusb' 'libusbx' 'libxml2' 'libzstd' 'libyaml' 'lz4-libs' 'systemd-libs' ) && \ rm -rf /var/cache/dnf /var/cache/yum && \ # The contents of paths mounted as emptyDir volumes in Kubernetes are saved # by the script `save-dir-contents` during the image build. The directory diff --git a/scanner/image/scanner/Dockerfile b/scanner/image/scanner/Dockerfile index 380d6054fadf2..67281249852be 100644 --- a/scanner/image/scanner/Dockerfile +++ b/scanner/image/scanner/Dockerfile @@ -38,7 +38,9 @@ COPY --from=mappings /mappings/repository-to-cpe.json /mappings/container-name-r RUN microdnf upgrade --nobest && \ microdnf clean all && \ # (Optional) Remove line below to keep package management utilities - rpm -e --nodeps $(rpm -qa curl '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*') && \ + rpm -v -e $(rpm -qa curl '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*' \ + 'elfutils-libelf' 'gnupg2' 'gpgme' 'libarchive' 'libcurl' 'libmodulemd' 'librepo' \ + 'libudev' 'libusb' 'libusbx' 'libxml2' 'libzstd' 'libyaml' 'lz4-libs' 'systemd-libs' ) && \ rm -rf /var/cache/dnf /var/cache/yum && \ chown -R 65534:65534 /tmp && \ # The contents of paths mounted as emptyDir volumes in Kubernetes are saved diff --git a/scanner/image/scanner/konflux.Dockerfile b/scanner/image/scanner/konflux.Dockerfile index 075c6b51ffa52..d9365be4d9bdb 100644 --- a/scanner/image/scanner/konflux.Dockerfile +++ b/scanner/image/scanner/konflux.Dockerfile @@ -66,7 +66,9 @@ COPY .konflux/scanner-data/repository-to-cpe.json .konflux/scanner-data/containe RUN microdnf upgrade --nobest && \ microdnf clean all && \ # (Optional) Remove line below to keep package management utilities - rpm -e --nodeps $(rpm -qa curl '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*') && \ + rpm -v -e $(rpm -qa curl '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*' \ + 'elfutils-libelf' 'gnupg2' 'gpgme' 'libarchive' 'libcurl' 'libmodulemd' 'librepo' \ + 'libudev' 'libusb' 'libusbx' 'libxml2' 'libzstd' 'libyaml' 'lz4-libs' 'systemd-libs' ) && \ rm -rf /var/cache/dnf /var/cache/yum && \ chown -R 65534:65534 /tmp && \ # The contents of paths mounted as emptyDir volumes in Kubernetes are saved