HEALTHCHECK

The Dockerfile instruction that tells Docker how to test whether the container is still working.

In more detail

HEALTHCHECK CMD ... runs a command at an interval; a nonzero exit code counts as a failure, and several in a row mark the container unhealthy. Options include --interval, --timeout, --start-period and --retries.

Example

HEALTHCHECK --interval=10s CMD wget -qO- http://localhost:8000/health || exit 1

Related terms

Taught in

References

Certification courses