dnf

Package management utility for RHEL, Fedora, and CentOS (replaces yum). More information: <https://dnf.readthedocs.io>.

CentOS
RUN yum install -y dnf
Fedora
RUN dnf install -y dnf
click the source code to copy install dnf on any operating system with command-not-found.com