Does docker-compose down record a docker-stop call on each container?

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?

+4
source share
1 answer

Following the links provided by user2915097 , it seems that this is indeed the case. The downclass Projectmethod calls a method stopthat seems to iterate over the containers and calls stopfor each of them.

+1
source

Source: https://habr.com/ru/post/1660040/


All Articles