A container can be ‘Running’ but actually ‘Dead’ (e.g., app crashed but process remains). Use the native Docker Healthcheck.
HEALTHCHECK --interval=30s --timeout=3s \ CMD curl -f http://localhost/health || exit 1
This allows orchestrators like Swarm or K8s to know exactly when to restart a zombie container, ensuring 99.9% uptime.
