Skip to content
Opsfolk

Running containers, topic 29 of 41

Logs and health checks

A container should write its logs to standard output and standard error, not to files: docker logs -f reads them, and a logging driver sends them on. The default json-file driver keeps them on disk with no limit unless you set max-size.

A running process is not a working service. HEALTHCHECK in a Dockerfile, or healthcheck in Compose, runs a command such as an HTTP request every few seconds, and docker ps shows the container as healthy or unhealthy.

On Opsfolk

Nothing of ours for this topic yet: an article is on its way.

Elsewhere

Your progress