Which one should i use? docker kill or docker stop?

前端 未结 3 619
[愿得一人]
[愿得一人] 2021-02-07 03:03

Will docker stop fail if processes running inside the container fail to stop?? If i use docker kill, can unsaved data inside the container be preserved

3条回答
  •  鱼传尺愫
    2021-02-07 03:11

    docker stop will send SIGTERM (terminate signal) to the process and docker will have 10 seconds to clean up like saving files or emitting some messages.

    Use docker kill when container is locked up, if it is not responding.

提交回复
热议问题