Skip to main content

Explain how Docker checks container health through health status propagation.

Mid Docker
Quick Answer Docker's healthcheck runs a command periodically (default every 30s). After a configurable number of consecutive failures (default 3), the container's health status changes to "unhealthy." Orchestrators like Kubernetes or Docker Swarm use this to stop routing traffic to it and trigger a restart or replacement.

Answer

Healthchecks run periodically and transition through starting, healthy, and unhealthy states used by orchestrators.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice