Docker Community Forums

Share and learn in the Docker community.

Delayed container shutdown via systemd

(Jopenpuhh16) #1


Is there any possibility to achieve the following situation?
When I executed systemctl stop docker:

1. triggers **docker exec** command to all my containers and force them to create some directory inside containers, for example ** mkdir /maint **

2. then it waits about 1 minute before it kills docker daemon. 

I’m trying to solve this issue at the moment, but for some reason when I execute systemctl stop docker the docker daemon stops immediately.

Best regards,