Collection of Health Checks for Docker Compose

Here is a collection of health-checks for Docker or Docker compose. In principle, using health-checks for container from Docker itself is conceptually flawed due to violating the principle of encapsulation. Docker health checks makes it such that the health-checking commands run within the container itself and the container has no stipulated obligation to provide tools necessary to perform a health check.

Regrettably, Docker couples with the health check and takes container-specific decisions based on the outcome of the health-check such that, in spite of this feature being broken at a theoretical level, health-checks still have to be used to use Docker's native feature-set.

For the very same reason, using these commands is problematic because each Docker container that will have to have a health-check implemented has to be scouted first by opening a shell within the container image and checking whether the various required tools are available. This section is organized by requirement, where the title of the page follows the main tool being used to perform the check.

Ideally health-checks should be used combined with some centralized way of monitoring containers.

Index