-
Notifications
You must be signed in to change notification settings - Fork 441
DL3057
Moritz Röhrich edited this page Mar 21, 2021
·
1 revision
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
FROM busybox
FROM busybox
HEALTHCHECK CMD /bin/health
or
FROM busybox
HEALTHCHECK NONE
When it is required to define a health check (e.g. by company policy), it must not be omitted.
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.