From 51402f4770ce26896e8a7ac4f270656bdfc30b7d Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Sun, 15 Mar 2015 13:51:46 +0100 Subject: [PATCH] Update README.md added hint to use -v for removal of volumes associated with the container when deleting it (to avoid orphaned volume folders on the host) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index acaef1c..846eee6 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,8 @@ If you want to run and then interact with a container, `docker start`, then spaw If you want a transient container, `docker run --rm` will remove the container after it stops. +If you want to remove also the volumes associated with the container, the deletion of the container must include the -v switch like in `docker rm -v`. + If you want to poke around in an image, `docker run -t -i ` to open a tty. If you want to map a directory on the host to a docker container, `docker run -v $HOSTDIR:$DOCKERDIR`. Also see [Volumes](https://github.com/wsargent/docker-cheat-sheet/#volumes).