> On Sep 26, 2017, at 3:21 PM, A Debian User <deb_mailingl...@niemeczek.at> > wrote: > > Hello, > > I am currently having trouble to get postfix running in a Docker Container. > > Docker requires a Process to stay alive and in foreground at ID 1, if not the > container dies. > > Is there any way to make it stay in the foreground, like it is possible for > instance with apachectl -DFOREGROUND (Without scripts, supervisor, ...)? > > Many thanks for helpful replies in advance!
This is not supported or easy. In multi-instance deployments Postfix runs multiple independent master(8) processes. None of them would be a natural distinguished foreground top-level process. There's no "meta-master" that sticks around to manage all the underlying masters. Even in a single-instance deployment, I don't see a suitable master(8) option for staying in the foreground. You might just need a dummy process that launches Postfix as a background child process, and sticks around forever, perhaps periodically trying to lock the master lock file and exiting if the lock is available. This assumes that Docker permits running background processes. If not, then Postfix is not a docker-compatible application. -- Viktor.