$ ./guess_the_languageDevOps
DevOps · medium · #241

What does this instruction add to the container?

HEALTHCHECK --interval=30s \
  CMD curl -f http://localhost/ || exit 1
  1. A load balancer in front of it
  2. A status probe marking it unhealthy
  3. Auto-restarts in plain Docker
  4. 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 ▸