It is fairly common practice in Docker to forward the logs from a container’s main process (as defined by
ENTRYPOINT instructions) into
stderr . The reasoning behind this decision is that the Docker daemon automatically collects any output sent to
stderr , allowing you to tail the standard output and errors of your container using for example
docker-compose logs -f [service name] .
Without forwarding, say — the logs from Nginx to standard error and out, you would not know what Nginx is up to. Like what…