no-apt
What it does
Section titled “What it does”Reports a RUN that calls apt; use apt-get or apt-cache instead.
Why it matters
Section titled “Why it matters”apt is made for people at a terminal: its output and options may change between versions, and it prints a warning that it has no stable command line interface and should be used with caution in scripts. apt-get and apt-cache keep an interface that scripts can rely on.
Example
Section titled “Example”...RUN apt update...RUN wget -q https://example.com/f...Configuration
Section titled “Configuration”dockerfile: lint: rules: no-apt: warn # off (default), warn, errorEnabled by the presets: dockerfile/hadolint.
Suppress one line with sudsy-disable-next-line no-apt 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 | DL3027 |
full |