mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
Merge pull request #62 from wsargent/update-volumes
Add links to volume commands.
This commit is contained in:
commit
942ca6c810
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -262,6 +262,16 @@ If you want to link across docker hosts then you should look at [Swarm](https://
|
|||
|
||||
Docker volumes are [free-floating filesystems](https://docs.docker.com/userguide/dockervolumes/). They don't have to be connected to a particular container. You should use volumes mounted from [data-only containers](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e) for portability.
|
||||
|
||||
### Lifecycle
|
||||
|
||||
* [`docker volumes create`](https://docs.docker.com/engine/reference/commandline/volume_create/)
|
||||
* [`docker volumes rm`](https://docs.docker.com/engine/reference/commandline/volume_rm/)
|
||||
|
||||
### Info
|
||||
|
||||
* [`docker volumes ls`](https://docs.docker.com/engine/reference/commandline/volume_ls/)
|
||||
* [`docker volumes inspect`](https://docs.docker.com/engine/reference/commandline/volume_inspect/)
|
||||
|
||||
Volumes are useful in situations where you can't use links (which are TCP/IP only). For instance, if you need to have two docker instances communicate by leaving stuff on the filesystem.
|
||||
|
||||
You can mount them in several docker containers at once, using `docker run --volumes-from`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue