stderr log seems to be not working
Hi,
I'm trying to migrate my old systems into docker containers, so I have created the following setup:
Dockerfile:
FROM debian:stretch
COPY VERSION /
RUN apt-get update && apt-get -y install bind9
RUN mkdir /var/log/named && chown bind:bind /var/log/named
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
docker-entrypoint.sh:
#!/bin/bash
set -e
cat <<EOF >> /etc/bind/named.conf.options
logging {
channel general {
file "/var/log/named/general.log" versions 5;
print-time yes;
print-category yes;
print-severity yes;
};
channel default_stderr {
stderr;
severity info;
};
category default { general; default_stderr; };
};
EOF
/etc/init.d/bind9 start
while sleep 5; do
date
done
I would like to redirect all the logs to the standard output, in order to see and catch it from outside, but it doesn't work whatever I try. It writes the log into the general log, but not to the stderr.
I read in another ticket that some log entries have been created before it parses the logs, but it writes nothing to the stderr, so I guess its not the case here.
Can someone show me a direction, how to solve this problem, or what am I missing?:)
ps: of course I tried it without general as well, like this:
category default { default_stderr; };
Thanks in advance!!