Day-1: Q2. What is the difference between docker stop and docker kill?

DevOps

MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare

docker stop stops the container gracefully where as docker kill terminates the process immediately. docker stop showing status as “Exited (0)” and docker kill showing status as “Exited (137)”

root@ip-172-31-28-155:/home/ubuntu# docker start anoop2
anoop2
root@ip-172-31-28-155:/home/ubuntu# docker start anoop1
anoop1
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep anoop
c5a741893181   httpd          "httpd-foreground"       4 minutes ago        Up 23 seconds                       80/tcp    anoop2
fc660bad9f21   httpd          "httpd-foreground"       4 minutes ago        Up 18 seconds           

root@ip-172-31-28-155:/home/ubuntu# docker stop anoop1
anoop1
root@ip-172-31-28-155:/home/ubuntu# docker kill anoop2
anoop2

root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep anoop
c5a741893181   httpd          "httpd-foreground"       4 minutes ago    Exited (137) 9 seconds ago              anoop2
fc660bad9f21   httpd          "httpd-foreground"       5 minutes ago    Exited (0) 12 seconds ago               anoop1Code language: PHP (php)