Saturday 9 May 2020

docker kill vs docker stop

Both the commands 'docker kill' and 'docker stop' are used to stop the container.

'docker kill' command sends 'SIGKILL' signal to the container, whereas 'docker stop' sends 'SIGTERM' signal, after a grace period it sends SIGKILL signal.

SIGTERM vs SIGKILL
a. 'SIGTERM' command tries the kill the process in a polite way, whereas SIGKILL command kill the process in a harsh way.

b. 'SIGTERM' command internally executes the command 'kill', whereas 'SIGKILL' command internally executes 'kill -9'

c. SIGTERM command can be handled, but SIGKILL can't be handled.


Previous                                                    Next                                                    Home

No comments:

Post a Comment