1 DL3036
Moritz Röhrich edited this page 2020-10-21 23:07:49 +02:00

zypper clean missing after zypper use

Problematic code:

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

Correct code:

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

Rationale:

Reduce layer and image size by deleting unneeded caches after running zypper.