zypper-no-dist-upgrade
What it does
Section titled “What it does”Reports a zypper dist-upgrade (or dup).
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”...RUN zypper install -y curl=7.0 && zypper clean...RUN zypper dist-upgradeRUN zypper -n in curl=1 && zypper ccConfiguration
Section titled “Configuration”dockerfile: lint: rules: zypper-no-dist-upgrade: warn # off (default), warn, errorEnabled 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.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| hadolint | DL3035 |
full |