Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
| ... | ... |
@@ -47,7 +47,15 @@ This will create a new volume inside a container at `/webapp`. |
| 47 | 47 |
### Mount a Host Directory as a Data Volume |
| 48 | 48 |
|
| 49 | 49 |
In addition to creating a volume using the `-v` flag you can also mount a |
| 50 |
-directory from your own host into a container. |
|
| 50 |
+directory from your Docker daemon's host into a container. |
|
| 51 |
+ |
|
| 52 |
+> **Note:** |
|
| 53 |
+> If you are using Boot2Docker, your Docker daemon only has limited access to |
|
| 54 |
+> your OSX/Windows filesystem. Boot2Docker tries to auto-share your `/Users` |
|
| 55 |
+> (OSX) or `C:\Users` (Windows) directory - and so you can mount files or directories |
|
| 56 |
+> using `docker run -v /Users/<path>:/<container path> ...` (OSX) or |
|
| 57 |
+> `docker run -v /c/Users/<path>:/<container path ...` (Windows). All other paths |
|
| 58 |
+> come from the Boot2Docker virtual machine's filesystem. |
|
| 51 | 59 |
|
| 52 | 60 |
$ sudo docker run -d -P --name web -v /src/webapp:/opt/webapp training/webapp python app.py |
| 53 | 61 |
|
| ... | ... |
@@ -67,8 +75,8 @@ create it for you. |
| 67 | 67 |
|
| 68 | 68 |
> **Note:** |
| 69 | 69 |
> This is not available from a `Dockerfile` due to the portability |
| 70 |
-> and sharing purpose of it. As the host directory is, by its nature, |
|
| 71 |
-> host-dependent, a host directory specified in a `Dockerfile` probably |
|
| 70 |
+> and sharing purpose of built images. The host directory is, by its nature, |
|
| 71 |
+> host-dependent, so a host directory specified in a `Dockerfile` probably |
|
| 72 | 72 |
> wouldn't work on all hosts. |
| 73 | 73 |
|
| 74 | 74 |
Docker defaults to a read-write volume but we can also mount a directory |