Docker: Drive has not been shared Docker: Drive has not been shared docker docker

Docker: Drive has not been shared


The docker run command includes volumes from the C drive, e.g. -v "C:\Users\admin\vsdbg\vs2017u5:/remote_debugger:rw". For these to work, you need to include the C drive in your shared drives (check the box under settings -> resources -> file sharing). You can also move the files to be shared to the D drive which is already shared to the embedded VM, though that is likely not an option in this case. To know which drives to share, check the drives used in volume mounts in the run command.

In previous versions of docker for Windows, this would silently succeed and mount an empty folder into the container. So the error telling users to check the shared drives first is a nice improvement.


Making drive C: available to Docker containers from the Docker Dashboard solved the problem, look at the picture once again where it was not checked.

A couple of comments must be shared IMHO, however.

  • The error message was not clear which drive needed to be shared (Linux supports more than a single drive, I guess)
  • If without making drive C: available (or the bootable drive, the one where the OS resides) Docker wouldn't be functional, why after its installation it did not checked the drive itself? This is just a click (!!) in the Docker Dashboard, so it should be (relatively) easy.

A very simple explanation why this quite useless message was displayed may exist - Linux developers type a lot (CLI!) and being not very happy with this they do not type enough to give a meaningful diagnostics to their users.

Well, I do believe I am not right, but still there must be an explanation why such a huge omission appears in a final product.


Add the Project under "File sharing" UI in docker:

Add the Project under "File sharing" UI in docker