TrafeX / docker-php-nginx

Docker image with PHP-FPM 8.3 & Nginx 1.26 on Alpine Linux
https://hub.docker.com/r/trafex/php-nginx
MIT License
1.37k stars 736 forks source link

Understanding /dev/stdout and /dev/stderr #51

Closed maggie44 closed 3 years ago

maggie44 commented 3 years ago

I see a bunch of the config files, such as supervisor point to /dev/stdout for logs and php's sub processes. My understanding was that these are not symlinked in docker containers by default, they only channel the processes launched through the CMD command in the dockerfile? Perhaps I'm wrong here, but not sure how the logs from these processes are captured or channeled, are they all just echoed up through the running process, and if so what is the reference in the various configs?

The container can manually echo to it's logs:

/proc/11/fd/1
/proc/11/fd/2

But an echo to /dev/stderr won't appear in the container logs.

maggie44 commented 3 years ago

Spoke to soon, catch_workers_output = yes answered my question.