Skip to content

single-entrypoint

Dockerfilesuspiciousno fixdefault: warndockerfile/hadolint

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.

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.

Reported
...
CMD ["a"]
...
ENTRYPOINT ["a"]
ENTRYPOINT ["b"]
...
FROM alpine:3 AS last
...
dockerfile:
lint:
rules:
single-entrypoint: warn # off, warn (default), error

Enabled by the presets: dockerfile/hadolint.

Suppress one line with sudsy-disable-next-line single-entrypoint 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 DL4004 full