Windows: Note about volumes in run
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit b9e65f40cf
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bff68bc605
commit
c00b451d46
1 changed files with 21 additions and 1 deletions
|
@ -237,7 +237,27 @@ binary (refer to [get the linux binary](
|
|||
you give the container the full access to create and manipulate the host's
|
||||
Docker daemon.
|
||||
|
||||
For in-depth information about volumes, refer to [manage data in containers](../../tutorials/dockervolumes.md)
|
||||
On Windows, the paths must be specified using Windows-style semantics.
|
||||
|
||||
PS C:\> docker run -v c:\foo:c:\dest microsoft/nanoserver cmd /s /c type c:\dest\somefile.txt
|
||||
Contents of file
|
||||
|
||||
PS C:\> docker run -v c:\foo:d: microsoft/nanoserver cmd /s /c type d:\somefile.txt
|
||||
Contents of file
|
||||
|
||||
The following examples will fail when using Windows-based containers, as the
|
||||
destination of a volume or bind-mount inside the container must be one of:
|
||||
a non-existing or empty directory; or a drive other than C:. Further, the source
|
||||
of a bind mount must be a local directory, not a file.
|
||||
|
||||
net use z: \\remotemachine\share
|
||||
docker run -v z:\foo:c:\dest ...
|
||||
docker run -v \\uncpath\to\directory:c:\dest ...
|
||||
docker run -v c:\foo\somefile.txt:c:\dest ...
|
||||
docker run -v c:\foo:c: ...
|
||||
docker run -v c:\foo:c:\existing-directory-with-contents ...
|
||||
|
||||
For in-depth information about volumes, refer to [manage data in containers](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
||||
|
||||
### Publish or expose port (-p, --expose)
|
||||
|
||||
|
|
Loading…
Reference in a new issue