Skip to content

Commit 0da3527

Browse files
committed
add comments on docker kill vs stop
1 parent 4ea1cc9 commit 0da3527

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

chapter_09_docker.asciidoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,16 @@ WARNING: Make sure you use the `-it` flags to the Docker `run`
857857
*******************************************************************************
858858
If you've got a container that's "hanging" in a terminal window,
859859
you can kill it from another one.
860+
// CSANAD: `docker stop` would trigger a graceful SIGTERM, `docker kill` sends a SIGKILL.
861+
// SIGKILL would terminate the container even when SIGTERM cannot, but it could
862+
// also result in broken DB, leave the port "in use" or other side effects. I would prefer
863+
// using `docker stop` over `kill` and mention `kill` in case the container is still stuck.
864+
//
865+
// However, if we leave it with just `docker kill`, then maybe we should mention these
866+
// possible side effects and also the title should reflect it like:
867+
// "How to Forcefully Stop a Docker Container" (since "How to Kill a Container" may sound a bit
868+
// harsh...
869+
860870
861871
The docker daemon lets you list all the currently running containers
862872
with `docker ps`:

0 commit comments

Comments
 (0)