From e52988528d20a729ed71e47e4d0a5fcb35c92dfc Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 4 Dec 2014 11:12:16 +1000 Subject: [PATCH] Add a note to point out to new users that B2D bind-mounts are special-ish Docker-DCO-1.1-Signed-off-by: Sven Dowideit (github: SvenDowideit) Signed-off-by: Sven Dowideit --- docs/sources/userguide/dockervolumes.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/sources/userguide/dockervolumes.md b/docs/sources/userguide/dockervolumes.md index 4663683c58..0af2694e9f 100644 --- a/docs/sources/userguide/dockervolumes.md +++ b/docs/sources/userguide/dockervolumes.md @@ -47,7 +47,15 @@ This will create a new volume inside a container at `/webapp`. ### Mount a Host Directory as a Data Volume In addition to creating a volume using the `-v` flag you can also mount a -directory from your own host into a container. +directory from your Docker daemon's host into a container. + +> **Note:** +> If you are using Boot2Docker, your Docker daemon only has limited access to +> your OSX/Windows filesystem. Boot2Docker tries to auto-share your `/Users` +> (OSX) or `C:\Users` (Windows) directory - and so you can mount files or directories +> using `docker run -v /Users/:/ ...` (OSX) or +> `docker run -v /c/Users/:/ come from the Boot2Docker virtual machine's filesystem. $ sudo docker run -d -P --name web -v /src/webapp:/opt/webapp training/webapp python app.py @@ -67,8 +75,8 @@ create it for you. > **Note:** > This is not available from a `Dockerfile` due to the portability -> and sharing purpose of it. As the host directory is, by its nature, -> host-dependent, a host directory specified in a `Dockerfile` probably +> and sharing purpose of built images. The host directory is, by its nature, +> host-dependent, so a host directory specified in a `Dockerfile` probably > wouldn't work on all hosts. Docker defaults to a read-write volume but we can also mount a directory