Score:0

Docker doesn't show information on STDERR

cz flag

I am trying to send the apache error logs to STDERR inside a docker container. Here's my site-config.conf file regarding the logs:

<VirtualHost *:8008>
    ErrorLog ${APACHE_LOG_DIR}/test_error.log
    CustomLog ${APACHE_LOG_DIR}/test_access.log combined
</VirtualHost>

Also, here's the relevant part of the Dockerfile:

RUN ln -sf /dev/stdout /var/log/apache2/test_access.log \
&& ln -sf /dev/stderr /var/log/apache2/test_error.log

For the STDOUT it works just fine, but the error log doesn't appear at all in the docker logs.

I even tested this version of the Dockerfile:

RUN ln -sf /dev/stdout /var/log/apache2/test_access.log \
&& ln -sf /dev/stdout /var/log/apache2/test_error.log

And this way the errors appeared. I also verified that I have the /dev/stderr file and it points to /proc/self/fd/2.

Do you have any clue why the docker logs doesn't contain the STDERR logs?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.