Pattern: Missing -y
flag for yum
Issue: -
Without the -y
flag or the equivalent --assumeyes
flag, yum will not successfully install a package, because human input is expected. The -y
flag makes yum assume 'yes' as the answer to prompts during the installation.
Example of incorrect code:
FROM centos
RUN yum install httpd-2.24.4 && yum clean all
Example of correct code:
FROM centos
RUN yum install -y httpd-2.24.4 && yum clean all