Pattern: Missing -y
for dnf install -y <package>
Issue: -
Omitting the non-interactive switch causes the command to fail during the build process, because dnf
would expect manual input. Use the -y
or the equivalent --assumeyes
flag to avoid this.
Example of incorrect code:
FROM fedora:32
RUN dnf install httpd-2.4.46 && dnf clean all
Example of correct code:
FROM fedora:32
RUN dnf install -y httpd-2.4.46 && dnf clean all