Debug School

Bhanu Prakash
Bhanu Prakash

Posted on

Diff between docker stop and docker kill?

*docker kill *- will stop the main entrypoint process/program abruptly
[root@localhost ~]# docker kill raju
raju
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5662bb7a660a httpd "httpd-foreground" About an hour ago Exited (137) 5 seconds ago raju

*docker stop *- will try to stop it gracefully (will ask politely)
[root@localhost ~]# docker stop raju
raju
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5662bb7a660a httpd "httpd-foreground" About an hour ago Exited (0) 16 seconds ago raju

Top comments (0)