Closed Moredread closed 7 years ago
tini
to handle the signal forwardingplease note, the latest release removes tini
. You need to launch the container with --init
flag so that docker daemon injects an init process that has the intended effect of forwarding signals and reaping zombie processes.
Currently apt-cacher-ng is run as PID 1. Therefore it doesn't have default signal handlers installed, e.g. as explained in https://github.com/krallin/tini/issues/8
This prevents a clean shutdown of the container with
docker stop
, and at least makes stopping the container take longer.To see the effect, start the image with the example config, i.e.
docker-compose up
, and stop it with CTRL-C. It takes a while to stop it, as docker kills the process only after a timeout.One option is to use
tini
, a minimalinit
implementation, that besides other things, forwards signals correctly.