Fix typos, address feedback

This commit is contained in:
Joao Fernandes 2018-04-06 09:25:47 -07:00 committed by Joao Fernandes
parent a6be568617
commit 572869c3a1
4 changed files with 23 additions and 25 deletions

View File

@ -122,11 +122,10 @@ By default this directory is:
You can configure the Docker daemon to use a different directory, using the You can configure the Docker daemon to use a different directory, using the
`data-root` configuration option. `data-root` configuration option.
Since all the state of a Docker daemon is kept on this directory, make sure Since the state of a Docker daemon is kept on this directory, make sure
you use a dedicated directory for each daemon. If two daemons share the same you use a dedicated directory for each daemon. If two daemons share the same
directory, as an example using an NFS share, you might get errors that are directory, for example, an NFS share, you are going to experience errors that
difficult to troubleshoot. are difficult to troubleshoot.
## Troubleshoot the daemon ## Troubleshoot the daemon

View File

@ -85,12 +85,14 @@ mounts is to think about where the data lives on the Docker host.
applications, consider using named volumes instead. You can't use applications, consider using named volumes instead. You can't use
Docker CLI commands to directly manage bind mounts. Docker CLI commands to directly manage bind mounts.
> **Warning**: One side effect of using bind mounts, for better or for worse, > Bind mounts allow access to sensitive files
>
> One side effect of using bind mounts, for better or for worse,
> is that you can change the **host** filesystem via processes running in a > is that you can change the **host** filesystem via processes running in a
> **container**, including creating, modifying, or deleting important system > **container**, including creating, modifying, or deleting important system
> files or directories. This is a powerful ability which can have security > files or directories. This is a powerful ability which can have security
> implications, including impacting non-Docker processes on the host system. > implications, including impacting non-Docker processes on the host system.
{: .warning } {: .important }
- **[tmpfs mounts](tmpfs.md)**: A `tmpfs` mount is not persisted on disk, either - **[tmpfs mounts](tmpfs.md)**: A `tmpfs` mount is not persisted on disk, either
on the Docker host or within a container. It can be used by a container during on the Docker host or within a container. It can be used by a container during

View File

@ -6,21 +6,20 @@ redirect_from:
- /engine/admin/volumes/tmpfs/ - /engine/admin/volumes/tmpfs/
--- ---
[Volumes](volumes.md) and [bind mounts](bind-mounts.md) allow you to share files [Volumes](volumes.md) and [bind mounts](bind-mounts.md) let you share files
between the host machine and container. This allows you to persist data even between the host machine and container so that you can persist data even after
after the container is stopped. the container is stopped.
If you're running Docker on Linux, you have a third option: `tmpfs` mounts. If you're running Docker on Linux, you have a third option: `tmpfs` mounts.
When you create a container with a `tmpfs` mount, the container has a way to When you create a container with a `tmpfs` mount, the container can create
create files outside the container's writable layer, just like it happens with files outside the container's writable layer.
volumes and bind mounts.
![tmpfs on the Docker host](images/types-of-mounts-tmpfs.png)
As opposed to volumes and bind mounts, a `tmpfs` mount is temporary, and only As opposed to volumes and bind mounts, a `tmpfs` mount is temporary, and only
persisted in the host memory. When the container stops, the `tmpfs` mount is persisted in the host memory. When the container stops, the `tmpfs` mount is
removed, and files written there won't be persisted. removed, and files written there won't be persisted.
![tmpfs on the Docker host](images/types-of-mounts-tmpfs.png)
This is useful to temporarily store sensitive files that you don't want to This is useful to temporarily store sensitive files that you don't want to
persist in either the host or the container writable layer. persist in either the host or the container writable layer.

View File

@ -362,24 +362,22 @@ $ docker container rm nginxtest
$ docker volume rm nginx-vol $ docker volume rm nginx-vol
``` ```
## Share data between machines ## Share data among machines
When building fault-tolerant applications, you might need to configure multiple When building fault-tolerant applications, you might need to configure multiple
replicas of the same service to have access to the same files. replicas of the same service to have access to the same files.
![shared storage](images/volumes-shared-storage.svg) ![shared storage](images/volumes-shared-storage.svg)
There are multiple ways to achieve this. One way is to develop your There are several ways to achieve this when developing your applications.
applications to store files on a cloud object storage system like Amazon S3. One is to add logic to your application to store files on a cloud object
Another option is to develop your applications to use volumes, but create the storage system like Amazon S3. Another is to create volumes with a driver that
volume using a driver that supports writing files to an external storage system supports writing files to an external storage system like NFS or Amazon S3.
like NFS or Amazon S3.
Volume drivers allow you to abstract to underlying storage system from the Volume drivers allow you to abstract the underlying storage system from the
application logic. As an example if your services are using a volume with application logic. For example, if your services use a volume with an NFS
an NFS driver, you can update the service to use a volume with a different driver, you can update the services to use a different driver, as an example to
driver and start storing data in the cloud, without having to make any changes store data in the cloud, without changing the application logic.
the the application logic.
## Use a volume driver ## Use a volume driver