Docker Debian Jessie – Can’t Find /var/log/syslog

crondebiandockerlogs

I'm building on top of a Postgres Docker container which has cron implemented on top of Debian Jessie:

For debugging I want to look at the logs which I'm expecting to be at /var/log/syslog, but I don't have syslog on the system.

Would I need to turn on logging manually with a Debian Jessie Docker container?

Best Answer

You need to install rsyslog inside the container. You could do this in dockerfile.

Example of simplest dockerfile:

FROM debian:latest

RUN apt-get install -q -y rsyslog
CMD ["sh", "-c", "service rsyslog start ; tail -f /dev/null"]
Related Question