mirror of https://github.com/docker/docs.git
Add graphics showing types of mounts (#4155)
This commit is contained in:
parent
d2971dfd0d
commit
95334935d6
|
@ -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.
|
||||
|
||||

|
||||
|
||||
## 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 |
|
@ -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.
|
||||
|
||||

|
||||
|
||||
- **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
|
||||
|
|
|
@ -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.
|
||||
|
||||

|
||||
|
||||
## Choosing the --tmpfs or --mount flag
|
||||
|
||||
Originally, the `--tmpfs` flag was used for standalone containers and
|
||||
|
|
|
@ -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.
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue