Docker

Docker

Made by DeepSource

Pin versions in dnf install DOK-W1005

Bug risk
Major

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 changes between different versions in required packages.

Bad Practice

FROM ruby:3
RUN dnf install -y httpd && dnf clean all

Recommended

FROM ruby:3
RUN dnf install -y httpd-2.24.2 && dnf clean all

References