advancedTop 100 Interview Questions

What does HEALTHCHECK actually do?

It defines a command Docker runs periodically inside the container to determine if it's `healthy`, `unhealthy`, or still `starting`; this status is visible via `docker ps`/`docker inspect` and can be used by orchestrators to make scheduling and load-balancing decisions, independent of whether the main process is merely still running.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Why might EXPOSE alone not be enough to access a container's service?← Back to all Docker questions