When attempting to shutdown the spamassessin container, it takes the timeout time until the container stops because the SIGTERM signal is not processed by all processes in the container. This causes the docker daemon to perform a forced shutdown after timeout passed, potentially causing data corruption, loss of time each time the container is stopped and other issues.
When attempting to shutdown the spamassessin container, it takes the timeout time until the container stops because the
SIGTERM
signal is not processed by all processes in the container. This causes the docker daemon to perform a forced shutdown aftertimeout
passed, potentially causing data corruption, loss of time each time the container is stopped and other issues.Expected: Graceful shoutdown.
How to reproduce:
docker stop spamassessin
Further reading: https://medium.com/@gchudnov/trapping-signals-in-docker-containers-7a57fdda7d86