Add graphics showing types of mounts (#4155)

This commit is contained in:
Misty Stanley-Jones 2017-08-10 14:21:16 -07:00 committed by GitHub
parent d2971dfd0d
commit 95334935d6
8 changed files with 9 additions and 1 deletions

View File

@ -19,6 +19,8 @@ available. If you are developing new Docker applications, consider using [named
volumes](volumes.md) instead. You can't use Docker CLI commands to directly
manage bind mounts.
![bind mounts on the Docker host](images/types-of-mounts-bind.png)
## Choosing the -v or --mount flag
Originally, the `-v` or `--volume` flag was used for standalone containers and

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -29,7 +29,9 @@ within the container. It is exposed as either a directory or an individual file
in the container's filesystem.
An easy way to visualize the difference among volumes, bind mounts, and `tmpfs`
mounts is to think about where the data lives on the Docker host:
mounts is to think about where the data lives on the Docker host.
![types of mounts and where they live on the Docker host](images/types-of-mounts.png)
- **Volumes** are stored in a part of the host filesystem which is _managed by
Docker_ (`/var/lib/docker/volumes/` on Linux). Non-Docker processes should not

View File

@ -20,6 +20,8 @@ machine's memory (or swap, if memory is low). When the container stops, the
`tmpfs` mount is removed. If a container is committed, the `tmpfs` mount is not
saved.
![tmpfs on the Docker host](images/types-of-mounts-tmpfs.png)
## Choosing the --tmpfs or --mount flag
Originally, the `--tmpfs` flag was used for standalone containers and

View File

@ -25,6 +25,8 @@ container's writable layer, because using a volume does not increase the size of
containers using it, and the volume's contents exist outside the lifecycle of a
given container.
![volumes on the Docker host](images/types-of-mounts-volume.png)
If your container generates non-persistent state data, consider using a
[tmpfs mount](tmpfs.md) to avoid storing the data anywhere permanently, and to
increase the container's performance by avoiding writing into the container's