Ensure use 'Zypper clean' after 'Zypper install'
zypper clean
command removes unneeded files that take storage space and affect your final image size. The size reduction can be surprisingly significant.
Risk Level: medium
Platform: Docker
Spectral Rule ID: DOCKR029
REMEDIATION
Append each zypper install
with zypper clean
.
FROM busybox:1.0
- RUN zypper install -y httpd=2.4
+ RUN zypper install -y httpd=2.4 && zypper clean
...
Read more:
Updated over 1 year ago