single-entrypoint
What it does
Section titled “What it does”Reports each ENTRYPOINT after the first one in the same stage. An ENTRYPOINT after ONBUILD is not counted, and a new FROM starts the count again.
Why it matters
Section titled “Why it matters”A container has one entrypoint. When a stage lists several ENTRYPOINT instructions only the last one takes effect, and the earlier ones are ignored without a warning, so a change to an earlier line does nothing.
Delete all but the one you mean.
Example
Section titled “Example”...CMD ["a"]...ENTRYPOINT ["a"]ENTRYPOINT ["b"]...FROM alpine:3 AS last...Configuration
Section titled “Configuration”dockerfile: lint: rules: single-entrypoint: warn # off, warn (default), errorEnabled by the presets: dockerfile/hadolint.
Suppress one line with sudsy-disable-next-line single-entrypoint 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 | DL4004 |
full |