Skip to content

single-healthcheck

Dockerfilesuspiciousno fixdefault: warndockerfile/hadolint

Reports each HEALTHCHECK after the first one in the same stage, HEALTHCHECK NONE included. A new FROM starts the count again.

A container has one health check. When a stage lists several only the last one takes effect, so an earlier one (an interval or a command you tuned) is ignored and the container is judged by another check than the file suggests.

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

Enabled by the presets: dockerfile/hadolint.

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