What is the diff between docker stop and 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!

Enroll Now

Docker stop command exits the container with exit code 0 while docker kill command exit the container with exit code 137.

root@ip-172-31-28-155:/home/ubuntu# docker stop srm
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep srm
05d0bb37cd21   httpd          "httpd-foreground"       4 minutes ago    Exited (0) 26 seconds ago               srm

root@ip-172-31-28-155:/home/ubuntu# docker start srm
root@ip-172-31-28-155:/home/ubuntu# docker kill srm
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep srm
	05d0bb37cd21   httpd          "httpd-foreground"       5 minutes ago    Exited (137) 2 seconds ago                  srm