-
Notifications
You must be signed in to change notification settings - Fork 407
DL3037
Moritz Röhrich edited this page Oct 21, 2020
·
1 revision
FROM opensuse/leap:15.2
RUN zypper install -y httpd && zypper clean
FROM opensuse/leap:15.2
RUN zypper install -y httpd=2.4.46 && zypper clean
Version pinning forces the build to retrieve a particular version regardless of what’s in the cache. This technique can also reduce failures due to unanticipated changes in required packages. (https://docs.docker.com/develop/develop-images/dockerfile_best-practices/)
Zypper also supports version constraining:
RUN zypper install -y httpd\>=2.4 && zypper clean
Use this to specify minimum version requirements.