dnf-yes
What it does
Section titled “What it does”Reports a dnf install, dnf groupinstall or dnf localinstall (also with microdnf) without -y or --assumeyes.
Why it matters
Section titled “Why it matters”Before it installs, dnf asks Is this ok [y/N]. A build has no terminal to answer, so dnf aborts with Operation aborted and the RUN fails.
Example
Section titled “Example”...RUN yum install -y curl-7.0 && yum clean allRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*RUN yum install -y nginx-1.2 && yum clean allRUN dnf install curl...RUN dnf install -y curl-7.0 && dnf clean all...Configuration
Section titled “Configuration”dockerfile: lint: rules: dnf-yes: warn # off, warn (default), errorEnabled by the presets: dockerfile/hadolint.
Suppress one line with sudsy-disable-next-line dnf-yes in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| hadolint | DL3038 |
full |