3. What is the difference between docker stop and 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 attempts to gracefully shutdown container(s) while docker kill (by default) immediately stops/terminates them;

docker stop issues a SIGTERM signal to the main process inside the container

docker kill (by default) issues a SIGKILL signal.

With docker kill, you may specify to send a different signal (to the main process inside the container) than the default SIGKILL signal, using the –signal flag. Same thing is not possible with the docker stop command.

With docker stop, the container(s) must comply to the shutdown request within a (configurable) grace period (which defaults to 10 seconds), after which it forcibly tries to kill the container. docker kill does not have any such timeout period.

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