Skip to content

yum-yes

Dockerfilecorrectnessno fixdefault: warndockerfile/hadolint

Reports a yum install, yum groupinstall or yum localinstall without -y or --assumeyes.

Before it installs, yum asks Is this ok [y/N]. A build has no terminal to answer, so yum reads the missing answer as no, exits with an error, and the RUN fails.

Reported
FROM fedora:40
RUN yum install curl
RUN yum install -y curl-7.0 && yum clean all
RUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*
RUN yum install -y nginx-1.2 && yum clean all
...
dockerfile:
lint:
rules:
yum-yes: warn # off, warn (default), error

Enabled by the presets: dockerfile/hadolint.

Suppress one line with sudsy-disable-next-line yum-yes in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
hadolint DL3030 full