docker stop
has a standard timeout of 10s (Reference - Docker Stop). This time window may be to short for the shutdown of mysql or influxdb to reach a consistent state on file system. If I stopped the container by hand, I would shut it down with docker stop -t 60 mysql
. But that is not the default case. The containers are on auto restart and started and stopped with the docker daemon.
If I stop the docker daemon (e.g. on system reboot), the daemon will stop all running container with a timeout of 10 seconds, which can cause inconsistent dbs.
Question: Is there a way to set the global timeout for docker stop
or the daemon stop?
Update 2016-05-03: Added [Feature Request] Add config parameter to change stop timeout for containers or globally #22471 on github.