Docker Community Forums

Share and learn in the Docker community.

Timeout before killing a container


(Pascal Stauffer) #1

Hi there,

I would like to know, if it’s possible to configure the time to wait before killing a container, during a docker stop/restart in a permanent way? Like a config-parameter / env variable.

  -t, --time=10      Seconds to wait for stop before killing it

Thanks for your help.


(Jeff Anderson) #2

This can only be set with the command line option:

The server will pretty much honor whatever the client sends it, and the default of 10 appears to be in the docker cli client, and not in the server.