What does this instruction add to the container?
HEALTHCHECK --interval=30s \ CMD curl -f http://localhost/ || exit 1
- A load balancer in front of it
- A status probe marking it unhealthy
- Auto-restarts in plain Docker
- A log line written every 30 seconds
Docker runs the command periodically and reports the container as healthy or unhealthy; plain Docker does not restart it on its own, but orchestrators and depends_on conditions can act on it.
Play DevOps ▸