Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but wonβt spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
Difference between docker kill/stop
[root@ip-172-31-17-58 centos]# docker ps -a | grep aarushi
7190d7753cb1 httpd "httpd-foreground" 3 minutes ago Exited (0) 3 seconds ago aarushi4
9a6ee8ab4226 httpd "httpd-foreground" 9 minutes ago Exited (137) 2 seconds ago aarushi3
For docker kill β process exits with a bad status code β 137
For docker stop β process exits with a good status code β 0
That validates what is specified in the documentation that for docker kill β process is terminated unexpectedly whereas for docker stop β process is terminated abruptly.
Note for the containers above we had got the status codes post below commands
docker stop aarushi4 && docker kill aarushi3
Difference between docker pause/unpause
We can apply pause on a container in running state.
But can apply unpause β on a paused container
If we donβt we get error like β
[root@ip-172-31-17-58 centos]# docker unpause aarushi4
Error response from daemon: Container 7190d7753cb15424fa078fd4c1f45798ca380519819278ed7c596d3d404e1c3b is not paused
[root@ip-172-31-17-58 centos]# docker pause liki
Error response from daemon: Container f22eaf3efd9a497e4ac104fcf8036cf9f4eeb94d783ae8b5f9599e5490d2ea9e is not running