mirror of https://github.com/docker/docs.git
Simplify storage overview
This commit is contained in:
parent
5bb6473a72
commit
cc5e866b2f
|
|
@ -6,8 +6,8 @@ redirect_from:
|
||||||
- engine/admin/volumes/
|
- engine/admin/volumes/
|
||||||
---
|
---
|
||||||
|
|
||||||
It is possible to store data within the writable layer of a container, but there
|
By default all files created inside a container are stored on a writable
|
||||||
are some downsides:
|
container layer. This means that:
|
||||||
|
|
||||||
- The data doesn't persist when that container is no longer running, and it can be
|
- The data doesn't persist when that container is no longer running, and it can be
|
||||||
difficult to get the data out of the container if another process needs it.
|
difficult to get the data out of the container if another process needs it.
|
||||||
|
|
@ -19,10 +19,11 @@ are some downsides:
|
||||||
kernel. This extra abstraction reduces performance as compared to using
|
kernel. This extra abstraction reduces performance as compared to using
|
||||||
_data volumes_, which write directly to the host filesystem.
|
_data volumes_, which write directly to the host filesystem.
|
||||||
|
|
||||||
Docker offers three different ways to mount data into a container from the
|
Docker has two options for containers to store files in the host machine, so
|
||||||
Docker host: _volumes_, _bind mounts_, or _`tmpfs` volumes_. When in doubt,
|
that the files are persisted even after the container stops: _volumes_, and
|
||||||
volumes are almost always the right choice. Keep reading for more information
|
_bind mounts_. If you're running Docker on Linux you can also use a _tmpfs mount_.
|
||||||
about each mechanism for mounting data into containers.
|
|
||||||
|
Keep reading for more information about these two ways of persisting data.
|
||||||
|
|
||||||
## Choose the right type of mount
|
## Choose the right type of mount
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue