Interview Prep/Docker/Resource Limits, Health & Reliability

What does Docker do when a container is unhealthy?

IntermediateProductionResource Limits, Health & Reliability
Answer

On plain Docker, nothing: it only marks the status and emits a health_status event. A restart policy does not react to health. Swarm replaces unhealthy tasks. Kubernetes ignores Docker HEALTHCHECK and uses its own probes. To auto-heal on a single host use a watcher like willfarrell/autoheal or systemd with Restart=.

All Docker questions Roadmap: Docker & containers

More on Resource Limits, Health & Reliability