Skip to content

zypper-yes

Dockerfilecorrectnessno fixdefault: warndockerfile/hadolint

Reports a zypper command that asks for confirmation. That is install (in), remove (rm), source-install (si) or patch without -n, --non-interactive, --no-confirm or -y.

zypper asks for confirmation before it changes packages and, when there is a conflict, which solution to take. A build has no terminal to answer, so the command cannot continue and the RUN fails.

--non-interactive makes zypper take the default answer to every question.

Reported
...
RUN dnf install -y curl-7.0 && dnf clean all
...
RUN zypper install curl
RUN zypper install -y curl=7.0 && zypper clean
...
dockerfile:
lint:
rules:
zypper-yes: warn # off, warn (default), error

Enabled by the presets: dockerfile/hadolint.

Suppress one line with sudsy-disable-next-line zypper-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 DL3034 full