dovecot / docker

Docker image sources for Dovecot
Other
35 stars 8 forks source link

favour --init instead of manually invoking tini #3

Closed gertcuykens closed 1 year ago

gertcuykens commented 1 year ago
docker run --name dovecot \
 -v /etc/letsencrypt:/etc/letsencrypt:ro \
 -v /etc/dovecot:/etc/dovecot:ro \
 -v /srv/mail:/srv/mail \
 --init -it --rm dovecot/dovecot
[WARN  tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Dec 29 00:06:11 master: Info: Dovecot v2.3.20 (80a5ac675d) starting up for imap, pop3, submission, sieve, lmtp

vs

docker run --name dovecot \
 -v /etc/letsencrypt:/etc/letsencrypt:ro \
 -v /etc/dovecot:/etc/dovecot:ro \
 -v /srv/mail:/srv/mail \
 -it --rm dovecot/dovecot

I argue that using --init is the way forward instead of invoking tini manually?

slusarz commented 1 year ago

Using --init provides unreliable behavior. From https://docs.docker.com/engine/reference/run/ :

The default init process used is the first docker-init executable found in the system path of the Docker daemon process.

There's no guarantee this executable will be tini. It makes more sense to hardcode this into the Dockerfile (as is currently done).

'docker run dovecot/dovecot' currently does what you expect it to do. You don't need to know to throw in additional command line arguments.

gertcuykens commented 1 year ago

ok fair enough