Skip to content

zypper-no-dist-upgrade

Dockerfilesuspiciousno fixdefault: offdockerfile/hadolint

Reports a zypper dist-upgrade (or dup).

A distribution upgrade moves every package to the newest version of the enabled repositories, possibly into a new distribution release. The image is then no longer the release that the base image’s tag names, and two builds can end in different states.

Use zypper update to apply fixes within the release, or move to a newer base image.

Reported
...
RUN zypper install -y curl=7.0 && zypper clean
...
RUN zypper dist-upgrade
RUN zypper -n in curl=1 && zypper cc
dockerfile:
lint:
rules:
zypper-no-dist-upgrade: warn # off (default), warn, error

Enabled by the presets: dockerfile/hadolint.

Suppress one line with sudsy-disable-next-line zypper-no-dist-upgrade 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 DL3035 full