Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: When you set the --rm flag, Docker also removes the volumes associated with the container when the container is removed. This is similar to running docker rm -v my-container. Only volumes that are specified without a name are removed. For example, withdocker run --rm -v /foo -v awesome:/bar busybox top, the volume for /foo will be removed, but the volume for /bar will not. Volumes inherited via --volumes-from will be removed with the same logic – if the original volume was specified with a name it will not be removed.

Mounting a Windows directory 

None of the examples in the docker help seem to work but I found a strange setup that does wok, I used the following command

docker run --name ubuntu-run -it -v //c/Users/Selvyn/demo/vm_share:/var/lib/host.demo ubuntu

The key seems to be in the //c/Users/Selvyn which is C:\Users\Selvyn.  This can be mounted, but anything outside of C:\Users\Selvyn won't work???  I suspect it is something to do with privileges.