A health check tells Docker (or an orchestrator) how to determine whether a container's application is actually working, not just running. A container's process can be up while the app is broken (hung, can't reach its database) — health checks detect this so the platform can react.
Defining a health check
# in a Dockerfile
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
# → Docker runs this command periodically; exit 0 = healthy, non-zero = unhealthy
[, , , ]
