Merge pull request #54 from jamesvl/patch-1

Added info for Docker 1.9 `docker volume` commands
This commit is contained in:
Will Sargent 2015-12-24 11:19:34 -08:00
commit 373d1aa936

View file

@ -246,7 +246,9 @@ Because volumes are isolated filesystems, they are often used to store state fro
See [advanced volumes](http://crosbymichael.com/advanced-docker-volumes.html) for more details. Container42 is [also helpful](http://container42.com/2014/11/03/docker-indepth-volumes/).
For an easy way to clean abandoned volumes, see [docker-cleanup-volumes](https://github.com/chadoe/docker-cleanup-volumes)
For an easy way to clean abandoned volumes, see [docker-cleanup-volumes](https://github.com/chadoe/docker-cleanup-volumes).
As of 1.9, there are [volume specific commands](http://docs.docker.com/engine/reference/commandline/volume_ls/) like create, ls, and rm. (Thus no need for the above script to clean abandoned volumes - see [delete dangling volumes](#delete-dangling-volumes) in the quick reference, below.)
As of 1.3, you can [map MacOS host directories as docker volumes](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume) through boot2docker:
@ -454,6 +456,16 @@ docker rmi $(docker images -q -f dangling=true)
docker rmi $(docker images -q)
```
### Delete dangling volumes
As of Docker 1.9:
```
docker volume rm $(docker volume ls -q -f dangling=true)
```
In 1.9.0, the filter `dangling=false` does _not_ work - it is ignored and will list all volumes.
### Show image dependencies
```