docker rm vs stop
docker stop
preserves the container in the docker ps -a
list (which gives the opportunity to commit it if you want to save its state in a new image).It sends SIGTERM first, then, after a grace period, SIGKILL.
docker rm
will remove the container from docker ps -a
list, loosing its "state" (the layered filesystems written on top of the image filesystem).It cannot remove a running container (unless called with
-f
, in which case it sends SIGKILL directly).
Comments
Post a Comment