apt-get-yes
What it does
Section titled “What it does”Reports an apt-get install that does not answer apt’s prompts. The flags that do are -y, --yes, --assume-yes and -qq (also -q=2 and --quiet twice), which implies yes; they may stand anywhere in the command (apt-get -y install is fine). Other apt-get commands are not checked.
Why it matters
Section titled “Why it matters”A build has no terminal to answer questions. When apt-get needs a confirmation, for example because the install pulls in additional packages, it prints Do you want to continue? [Y/n] Abort. and exits with an error, which fails the RUN and the build.
Example
Section titled “Example”FROM debian:12RUN apt-get update && apt-get install curl...Configuration
Section titled “Configuration”dockerfile: lint: rules: apt-get-yes: warn # off, warn (default), errorEnabled by the presets: dockerfile/hadolint.
Suppress one line with sudsy-disable-next-line apt-get-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 | DL3014 |
full |