root@ip-172-31-18-66:/home/ubuntu# docker stop 38fc821c437d
38fc821c437d
root@ip-172-31-18-66:/home/ubuntu# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
38fc821c437d httpd "httpd-foreground" 2 minutes ago Exited (0) 4 seconds ago srucon
Docker stop - sends SIGTERM signal to the running container to stop the processes gracefully.
root@ip-172-31-18-66:/home/ubuntu# docker kill 38fc821c437d
38fc821c437d
root@ip-172-31-18-66:/home/ubuntu# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
38fc821c437d httpd "httpd-foreground" 2 minutes ago Exited (137) 2 seconds ago srucon
Docker kill - kills the container and does not shutdown the process gracefully
Top comments (0)