Docker

Docker

Made by DeepSource

Missing zypper clean after zypper install DOK-P1001

Performance
Minor

Not cleaning cached package data after installation can result in higher image sizes. It is always recommended to clean the cached packages after installing them.

Please note that the clean-up must be performed in the same RUN step as it creates a separate layer. Doing this in a different RUN command would therefore result in a new layer, which will not help reduce the image size.

Bad Practice

FROM opensuse/leap:15.2
RUN zypper install -y httpd=2.4.46

Recommended

FROM opensuse/leap:15.2
RUN zypper install -y httpd=2.4.46 && zypper clean