Docker stop command stops the container gracefully and safely. It is not abruptly shut the containers. In this case four events triggers kill, die, disconnect network and stop container. It will send SIGTERM signal(28). If in case if it couldn't stop container in certain time then it kills the container.
docker stop containerid
Docker kill command kills the container abruptly and in unsafe manner. It will directly kills the container and send 3 events which are kill, die and disconnect network. It actually send SIGKILL(9) signal to kill container immediately
docker kill containerid
All events can be tracked by running
docker events command
Top comments (1)
@rajesh_kumar please find the difference above