dinkel / docker-spamassassin

SpamAssassin as a Docker image
MIT License
16 stars 23 forks source link

Support graceful shutdown #4

Open Rillke opened 7 years ago

Rillke commented 7 years ago

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.

Expected: Graceful shoutdown.

How to reproduce: docker stop spamassessin

Further reading: https://medium.com/@gchudnov/trapping-signals-in-docker-containers-7a57fdda7d86