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

Starting and stopping a container is not the same as starting and stopping a normal process. To terminate a container, Docker provides the docker stop and docker kill commands. Both the docker kill and docker stop commands look similar, but their internal execution is different. The docker stop commands issue the SIGTERM signal, whereas the docker kill commands sends the SIGKILL signal. The execution of the SIGTERM and SIGKILL. is different. Unlike SIGKILL, the SIGTERM gracefully terminates a process rather than killing it immediately. It is possible to handle, ignore or block a SIGTERM signal, but a SIGKILL signal cannot be blocked or handled. SIGTERM allows a child process or parent process the opportunity to send information to other processes

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x