You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install packages without docs to reduce image size
The UBI base images do not set tsflags in /etc/dnf/dnf.conf, so every dnf
install and dnf update we run installs documentation and man pages into
the layers we ship. They grow the image for no runtime benefit and get
picked up by CI scanners; #772 hit this when the perl docs pulled in by
git were flagged for containing sample secrets.
Set tsflags=nodocs once per RHEL image, before the first dnf transaction,
so every later call inherits it. That covers the installs in install.sh
and the CVE_UPDATES blocks, and also the ones nvidia-driver and
ocp_dtk_entrypoint run when the container starts, which passing --nodocs
per command would have missed.
The bases differ in what they provide, so the value is written through
dnf's own config writer rather than by editing the file directly:
rockylinux 9.8-ubi and 10.2-ubi already ship tsflags=nodocs, so nothing
is done; ubi8, ubi9, ubi10 and the CUDA UBI bases have config-manager
preinstalled; rockylinux 8.10-ubi has neither and installs it first.
Installing config-manager costs about 4 MiB and only happens on
rockylinux 8, which is close to end of life. Everywhere else it is free.
Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
0 commit comments