4 DL3012
Moritz Röhrich edited this page 2021-03-21 11:28:41 +01:00

Multiple HEALTHCHECK instructions

Problematic code:

FROM busybox
HEALTHCHECK CMD /bin/healthcheck
[...]
HEALTHCHECK CMD /bin/something

Correct code:

FROM busybox
HEALTHCHECK CMD /bin/healthcheck

or

FROM busybox
HEALTHCHECK NONE

Rationale:

Providing more than one HEALTHCHECK instruction per stage is confusing, error prone and possibly makes for larger than necessary Docker images.

Note:

This rule used to be Provide an email adress or URL as maintainer., but that was deprecated and eventually replaced with the current rule.