dnf install
DOK-W1005Version 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.
FROM ruby:3
RUN dnf install -y httpd && dnf clean all
FROM ruby:3
RUN dnf install -y httpd-2.24.2 && dnf clean all