Docker Community Forums

Share and learn in the Docker community.

How to mount any directory on Windows host to D drive inside the Windows container?

docker

#1

Scenario:
I have a dockerfile, as simple as this.

FROM microsoft/nanoserver
VOLUME [“D:”]

Now, I when run this image with

  • docker run -it -v D:\path\in\host:C:\path\in\container cmd

it works, but if I run

  • docker run -it -v D:\path\in\host:D:\path\in\container cmd
  • docker: Error response from daemon: container aad78607d5d0f833b9403ad80d8247ac3cbfd0ca56cee7d3963282505fd977f0 encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106).

it throws error, I want to mount the directory to D:\ drive inside the container. How can I do that?