No logs from postfix in docker

Hi!

I created this docer container for postfix:

FROM debian

RUN export DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y syslog-ng syslog-ng-core
RUN  apt-get install -y postfix vim \
&& rm -rf /var/lib/apt/lists/*

RUN update-rc.d postfix enable

ENTRYPOINT service postfix start && service syslog-ng start && /bin/bash

But I can’t see any logs when I run “journalclt -f”. There is some special configuration for docker to allow services logging?

No, as it is you won’t see any postfix logs with journalctl.

What appears in journalctl is what has been written to STDOUT.

In order to see logs you either need to run tyour processes so that they log to STDOUT, or else you need to run a process that will echo logs to STDOUT. You could for instance run a “tail -f /var/log/maillog”.

Others here may be able to give you better packaged solutions