Docker Community Forums

Share and learn in the Docker community.

How do I mount host directory to a container?

Trying to use -v parameter to mount host directory d:\docker\content to root of C drive in container. Getting error below, What am I doing wrong? Docker version Server Version: 1.13.0-rc2, host is Win10 Annivesary.

PS C:\Users\admin> docker run -it microsoft/windowsservercore -v d:\docker\content:/c:\ cmd.exe
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 6f6d13544d185337031cdc477e7988204ea195aa8b77f6368e15639f223a963a encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"ApplicationName":"","CommandLine":"-v d:\\docker\\content:/c:\\ cmd.exe","User":"","WorkingDirectory":"C:\\","Environment":{},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":false,"ConsoleSize":[64,213]}.
time="2016-12-05T14:22:47-06:00" level=error msg="error getting events from daemon: net/http: request canceled"