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

前端 未结 3 611
[愿得一人]
[愿得一人] 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:17

    You should use docker stop since it stops the container gracefully - like shutting down your laptop, instead of killing them - like forcibly turn off the laptop from it's battery.

    But, Docker will force shut down (kill the processes) by the time it takes 10 seconds to stop them gracefully.

提交回复
热议问题