Docker Stop Vs Docker Kill
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
docker pull nginx
docker run --name akilan -d nginx
docker run --name akilan2 -d nginx
docker stop --time=30 akilan2
docker kill --time=30 akilan -------> Will not execute
docker kill akilan ------> Will execute
docker stop will accept the time in other words it’ll not force the process to stop. But the docker kill will force the running process to stop.
When we use the command docker stop on the stopped container, it will not throw any error. But if we try using the docker kill command on the stopped container it will throw an error.