Simplify storage overview

This commit is contained in:
Joao Fernandes 2018-04-03 10:10:56 -07:00 committed by Joao Fernandes
parent 5bb6473a72
commit cc5e866b2f
1 changed files with 7 additions and 6 deletions

View File

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