HEALTHCHECK tells the orchestrator when the app is actually up
A container counts as "running" the moment its process starts, which is before the app can serve a single request. A health check makes "up" mean "answering".
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \
CMD curl -fsS http://localhost:3000/health || exit 1Compose waits for it with depends_on: condition: service_healthy. Kubernetes has its own probes and ignores this one, so if you deploy there, set both.
dockeroperations