问题原文
原帖链接 · Farhan · CC BY-SA 4.0
Is there any way to run Postfix in foreground?
I want to run Postfix as PID 1 in docker. I don't want to use any bash shell, supervisorD, or any wrapper to start it.
I just want to know if there is any way to start it in foreground so I can check its logs from "docker logs 'container-name'"
When I manually run "postfix start" it runs and then starts in background. Any way to keep it in foreground?
Thanks
已采纳解答
原帖链接 · webwurst · CC BY-SA 3.0
Postfix needs a syslog daemon for logging. For a concise example of a Dockerfile running Postfix see jessfraz/dockerfiles/postfix.
This runs rsyslog in the container and starts Postfix parallel to that like this:
exec /usr/lib/postfix/master -c /etc/postfix -d 2>&1
tail -F /var/log/mail.log
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
