I wrote a Python program that guarantees that its threads will be gracefully stopped after receiving a Unix SIGTERM signal. I understand that docker stop sends a SIGTERM request to the main process inside the container and after the SIGKILL grace period. The documentation for docker-compose down claims that it "stops containers", but does not explicitly say how to do this. I guess what he calls docker stopin each container?
source
share