8000 DL3057 · hadolint/hadolint Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Moritz Röhrich edited this page Mar 21, 2021 · 1 revision

HEALTHCHECK instruction missing.

This is an optional rule which is disabled by default. To enable it, set its severity to the preferred level, e.g.

$ hadolint --warning=DL3057 Dockerfile

Problematic code:

FROM busybox

Correct code:

FROM busybox
HEALTHCHECK CMD /bin/health

or

FROM busybox
HEALTHCHECK NONE

Rationale:

When it is required to define a health check (e.g. by company policy), it must not be omitted.

Note:

This rule is disabled by default, because a HEALTHCHECK is not desirable in all circumstances. Images used with Kubernetes for example do not benefit from a HEALTHCHECK instruction, as Kubernetes brings its own mechanisms to accomplish the same thing. If however it is desired, this rule makes sure a build stage either has a HEALTHCHECK instruction, or inherits it from an earlier build stage.

Clone this wiki locally
0