mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
Added info for Docker 1.9 docker volume
commands
This commit is contained in:
parent
deca1256fb
commit
76815d544c
1 changed files with 13 additions and 1 deletions
14
README.md
14
README.md
|
@ -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/).
|
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:
|
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)
|
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
|
### Show image dependencies
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue