Docker Community Forums

Share and learn in the Docker community.

Cannot Share Drive in Windows 10

have you tried linking your drive using docker volume flag?

docker -v c:\hostpath:dockerpath

Yes. it returns the message “C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: D: drive is not shared. Please share it in Docker for Windows Settings.”

On your tray, next to your clock, right-click on Docker, then click on Settings, there you’ll find the Shared Drives: just mark your drive and hit apply!

3 Likes

Yes. that’s what I did and the issue I outlined in the first post. It said “Firewall Detected”. Here is the log,

[23:54:24.204][ApiProxy ][Info ] proxy << POST /v1.26/containers/4941f51f61ffec57c4497991650d982869b4275734c378580968b7cce29a8e44/start
[23:54:25.285][ApiProxy ][Info ] proxy << POST /v1.26/containers/4941f51f61ffec57c4497991650d982869b4275734c378580968b7cce29a8e44/attach?stderr=1&stdin=1&stdout=1&stream=1
[23:54:25.676][SambaShare ][Error ] Unable to mount D drive: firewall is blocking
[23:54:25.679][SambaShare ][Info ] Removing share D

My bad, I overlooked that!
I know that it isn’t exactly what you’re looking for, but try this and see if it works: move your project to C:/Users, edit the project folder’s permissions and add Full control to Users, then on your terminal, run docker run -p your_port:container_port -v /c/users/your_project:/your_container_workdir image_name command, make sure you’ve followed the Example section of this documentation.

I’ve been beating my head on this for days and just managed to get it working yesterday, though I did not have the firewall issue itself, my initial problem mas because I couldn’t get to share my E: drive, and was also having issues with the proper format of the path to share a volume with the container, and it also didn’t work with composer even though I used the same parameters on the docker run command I wrote above.

I see. Yup. I did set the permission of the folder, tried ‘everyone’ and added full control. It still didn’t work. Also tried adding another share name, adding another user, nothing is related.

While digging around, I found the following status info is a bit strange. The ip4connectivity is set to ‘NoTraffic’, not quite understand the implication.

Name : Unidentified network
InterfaceAlias : vEthernet (HNS Internal NIC)
InterfaceIndex : 32
NetworkCategory : Private
IPv4Connectivity : NoTraffic
IPv6Connectivity : NoTraffic

Name : Unidentified network
InterfaceAlias : vEthernet (DockerNAT) 2
InterfaceIndex : 11
NetworkCategory : Private
IPv4Connectivity : NoTraffic
IPv6Connectivity : NoTraffic

I found the followings in the log. Apparently initially the share was created successfully, but later something failed and docker concluded that it’s a firewall issue.

[20:42:31.989][NamedPipeServer][Info ] Mount(D, JYUNG-SURFACEPR\jyung:**********, Docker.Core.Settings)
[20:42:31.989][SambaShare ][Info ] Mount D
[20:42:32.074][Cmd ][Info ] Share name D
[20:42:32.074][Cmd ][Info ] Path D:
[20:42:32.074][Cmd ][Info ] Remark
[20:42:32.074][Cmd ][Info ] Maximum users No limit
[20:42:32.077][Cmd ][Info ] Users
[20:42:32.077][Cmd ][Info ] Caching Manual caching of documents
[20:42:32.078][Cmd ][Info ] Permission Everyone, FULL
[20:42:32.078][Cmd ][Info ]
[20:42:32.078][Cmd ][Info ] The command completed successfully.
[20:42:32.078][Cmd ][Info ]
[20:42:32.087][SambaShare ][Info ] “D” is shared
[20:42:32.096][SambaShare ][Info ] Username: jyung
[20:42:32.096][SambaShare ][Info ] Host IP: 10.0.75.1
[20:42:32.096][SambaShare ][Info ] Cifs options: noperm,iocharset=utf8,nobrl,mfsymlinks,vers=3.02,domain=JYUNG-SURFACEPR




[20:42:32.748][ApiProxy ][Info ] Upgrading to raw stream
[20:42:32.750][ApiProxy ][Info ] proxy >> GET /v1.26/events?filters=%7B%22container%22%3A%7B%22b70848264c9c85063e38a6ef4067f674541fca9138acf863c01be2f3009e6837%22%3Atrue%7D%2C%22type%22%3A%7B%22container%22%3Atrue%7D%7D
[20:42:32.750][ApiProxy ][Info ] Dial Hyper-V socket f063fc15-ba59-4a54-8532-44f5a8bf4506:23a432c2-537a-4291-bcb5-d62504644739
[20:42:32.753][ApiProxy ][Info ] Successfully dialed Hyper-V socket f063fc15-ba59-4a54-8532-44f5a8bf4506:23a432c2-537a-4291-bcb5-d62504644739
[20:42:32.758][ApiProxy ][Info ] proxy >> POST /v1.26/containers/b70848264c9c85063e38a6ef4067f674541fca9138acf863c01be2f3009e6837/start [start]
[20:42:32.758][ApiProxy ][Info ] proxy >> POST /v1.26/containers/b70848264c9c85063e38a6ef4067f674541fca9138acf863c01be2f3009e6837/start
[20:42:32.758][ApiProxy ][Info ] Dial Hyper-V socket f063fc15-ba59-4a54-8532-44f5a8bf4506:23a432c2-537a-4291-bcb5-d62504644739
[20:42:32.759][ApiProxy ][Info ] Successfully dialed Hyper-V socket f063fc15-ba59-4a54-8532-44f5a8bf4506:23a432c2-537a-4291-bcb5-d62504644739
[20:42:33.188][ApiProxy ][Info ] proxy << POST /v1.26/containers/b70848264c9c85063e38a6ef4067f674541fca9138acf863c01be2f3009e6837/start
[20:42:34.271][ApiProxy ][Info ] proxy << POST /v1.26/containers/b70848264c9c85063e38a6ef4067f674541fca9138acf863c01be2f3009e6837/attach?stderr=1&stdin=1&stdout=1&stream=1
[20:42:34.760][ApiProxy ][Info ] Cancel connection…
[20:42:34.764][ApiProxy ][Info ] proxy << GET /v1.26/events?filters=%7B%22container%22%3A%7B%22b70848264c9c85063e38a6ef4067f674541fca9138acf863c01be2f3009e6837%22%3Atrue%7D%2C%22type%22%3A%7B%22container%22%3Atrue%7D%7D
[20:42:34.778][SambaShare ][Error ] Unable to mount D drive: firewall is blocking
[20:42:34.778][SambaShare ][Info ] Removing share D
[20:42:34.847][NamedPipeClient][Info ] Received response for Mount
[20:42:34.846][NamedPipeServer][Info ] Mount done in 00:00:02.8575207.

Are you trying to access running docker container file system remotely over file sharing? I’m confused about your setup.

Hi all, the latest Windows 10 insider build 15042 fixed it. Thanks for looking into it.

It does not work now. Another observation is that after the share attempt failed, the share drive became ‘disabled’.

Turning off the firewall does not help. So it’s probably not a firewall issue.

Windows 10 Pro 1703
Docker 17.03.1

Open file explorer and type

  1. //127.0.0.1 or //local interface address --> the shared drive can be accessed
  2. //10.0.75.1 --> Windows cannot access 10.0.75.1
  3. //172.26.96.1 (another vEthernet NIC that is assigned into public network) --> the shared drive can be accessed

I checked the sharing option for both private and public network and both are enabled.

(Firewall log is enabled and no blocking is recorded for 10.0.75.x)

What may be the possible reasons for the inaccessbility to docker vEthernet NIC?

Just upgraded docker and the issue is fixed. The reason seems to be documented in the release note.

What is the version that you updated Docker to that worked; I am having the same issue?

1 Like

I also cannot add my shared drive in some instances. I enter the Docker application in the bottom right of Windows, click Settings > Shared Drives, select my chosen drive “C:”, and then when prompted for my password I correctly enter my password.

My username is also correct.

It just bloody resets to unticked.

Sometimes it works, but it requires resetting after every time I log out and back in.

Docker version 18.09.0, build 4d60db4
Windows 10 Pro - 1803 - Build 17134.472

3 Likes

I had the same issue. Resolved by creating a new user without microsoft account and making it admin. Then while sharing the drives provided credentials of newly created user.

Give it a try.

I’m having the same difficulty on Windows 10 Enterprise, 1809, OS build 17763.437; Docker 2.0.0.3 (31259), stable, 8858db3.

When I check the box under Docker Desktop -> Settings -> Shared Drives -> Shared -> [x] C, then click Apply:

image
Thanks very much!

I think this is the relevant log info:

[16:21:36.011][SharedDrivesSettings][Info   ] Apply shared drive settings
[16:21:36.012][NamedPipeClient][Info   ] Sending Version()...
[16:21:36.013][NamedPipeClient][Info   ] Received response for Version
[16:21:36.013][NamedPipeClient][Info   ] Sending Mount(All, C, GS\ashalper:**********, Docker.Core.Settings)...
[16:21:36.013][NamedPipeServer][Info   ] Version()
[16:21:36.013][NamedPipeServer][Info   ] Version done in 00:00:00.
[16:21:36.015][NamedPipeServer][Info   ] Mount(All, C, GS\ashalper:**********, Docker.Core.Settings)
[16:21:36.088][SambaShare     ][Info   ] Mount C
[16:21:36.152][Cmd            ][Info   ] This shared resource does not exist.
[16:21:36.152][Cmd            ][Info   ] More help is available by typing NET HELPMSG 2310.
[16:21:36.157][SambaShare     ][Info   ] "C" is not shared
[16:21:36.157][SambaShare     ][Info   ] Creating share "C:\" as "C" with Full Control to "GS\ashalper"
[16:21:36.289][Cmd            ][Info   ] C was shared successfully.
[16:21:36.353][Cmd            ][Info   ] Share name        C
[16:21:36.353][Cmd            ][Info   ] Path              C:\
[16:21:36.353][Cmd            ][Info   ] Remark            
[16:21:36.353][Cmd            ][Info   ] Maximum users     No limit
[16:21:36.354][Cmd            ][Info   ] Users             
[16:21:36.354][Cmd            ][Info   ] Caching           Caching disabled
[16:21:36.354][Cmd            ][Info   ] Permission        GS\ashalper, FULL
[16:21:36.354][Cmd            ][Info   ] The command completed successfully.
[16:21:36.361][SambaShare     ][Info   ] "C" is shared
[16:21:36.514][SambaShare     ][Info   ] Username: ashalper
[16:21:36.514][SambaShare     ][Info   ] Host IP: 10.0.75.1
[16:21:36.514][SambaShare     ][Info   ] Cifs options: noperm,iocharset=utf8,dir_mode=0777,nobrl,mfsymlinks,vers=3.02,domain=GS,sec=ntlmsspi
[16:21:36.595][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy >> GET /_ping\n"
[16:21:36.597][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy << GET /_ping (978.5µs)\n"
[16:21:36.597][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy >> POST /v1.39/images/load?quiet=1\n"
[16:21:36.742][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy << POST /v1.39/images/load?quiet=1 (144.8337ms)\n"
[16:21:36.829][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy >> GET /_ping\n"
[16:21:36.831][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy << GET /_ping (1.9866ms)\n"
[16:21:36.834][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy >> POST /v1.39/containers/create [rewriteBinds]\n"
[16:21:36.834][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="Rewrote mount /run/config/docker:/host_mnt (volumeDriver=) to /run/config/docker:/host_mnt"
[16:21:36.834][ApiProxy       ][Info   ] time="2019-05-14T16:21:36-07:00" msg="proxy >> POST /v1.39/containers/create\n"
[16:21:37.014][ApiProxy       ][Info   ] time="2019-05-14T16:21:37-07:00" msg="proxy << POST /v1.39/containers/create (179.9459ms)\n"
[16:21:37.015][ApiProxy       ][Info   ] time="2019-05-14T16:21:37-07:00" msg="proxy >> POST /v1.39/containers/970afac23a06b4c74242d3efae1c163db501a8b59ffad7f46afa63aec9840f0c/attach?stderr=1&stdin=1&stdout=1&stream=1\n"
[16:21:37.017][ApiProxy       ][Info   ] time="2019-05-14T16:21:37-07:00" msg="Upgrading to raw stream"
[16:21:37.018][ApiProxy       ][Info   ] time="2019-05-14T16:21:37-07:00" msg="proxy >> POST /v1.39/containers/970afac23a06b4c74242d3efae1c163db501a8b59ffad7f46afa63aec9840f0c/wait?condition=removed\n"
[16:21:37.020][ApiProxy       ][Info   ] time="2019-05-14T16:21:37-07:00" msg="proxy >> POST /v1.39/containers/970afac23a06b4c74242d3efae1c163db501a8b59ffad7f46afa63aec9840f0c/start [start]\n"
[16:21:37.020][ApiProxy       ][Info   ] time="2019-05-14T16:21:37-07:00" msg="proxy >> POST /v1.39/containers/970afac23a06b4c74242d3efae1c163db501a8b59ffad7f46afa63aec9840f0c/start\n"
[16:21:37.058][Moby           ][Info   ] [   77.824843] docker0: port 1(vethc187fa4) entered blocking state
[16:21:37.099][Moby           ][Info   ] [   77.861596] docker0: port 1(vethc187fa4) entered disabled state
[16:21:37.132][Moby           ][Info   ] [   77.903597] device vethc187fa4 entered promiscuous mode
[16:21:37.172][Moby           ][Info   ] [   77.935978] IPv6: ADDRCONF(NETDEV_UP): vethc187fa4: link is not ready
[16:21:37.311][Moby           ][Info   ] [   78.086557] IPVS: Creating netns size=2104 id=13
[16:21:37.343][Moby           ][Info   ] [   78.114996] IPVS: ftp: loaded support on port[0] = 21
[16:21:37.482][Moby           ][Info   ] [   78.260787] eth0: renamed from veth4d77704
[16:21:37.560][Moby           ][Info   ] [   78.320520] IPv6: ADDRCONF(NETDEV_CHANGE): vethc187fa4: link becomes ready
[16:21:37.596][Moby           ][Info   ] [   78.363918] docker0: port 1(vethc187fa4) entered blocking state
[16:21:37.633][Moby           ][Info   ] [   78.400544] docker0: port 1(vethc187fa4) entered forwarding state
[16:21:37.725][ApiProxy       ][Info   ] time="2019-05-14T16:21:37-07:00" msg="proxy << POST /v1.39/containers/970afac23a06b4c74242d3efae1c163db501a8b59ffad7f46afa63aec9840f0c/start (704.5909ms)\n"
[16:21:38.826][ApiProxy       ][Info   ] time="2019-05-14T16:21:38-07:00" msg="proxy << POST /v1.39/containers/970afac23a06b4c74242d3efae1c163db501a8b59ffad7f46afa63aec9840f0c/attach?stderr=1&stdin=1&stdout=1&stream=1 (1.8114438s)\n"
[16:21:38.875][Moby           ][Info   ] [   79.641145] docker0: port 1(vethc187fa4) entered disabled state
[16:21:38.901][Moby           ][Info   ] [   79.679137] veth4d77704: renamed from eth0
[16:21:39.043][Moby           ][Info   ] [   79.809922] docker0: port 1(vethc187fa4) entered disabled state
[16:21:39.075][Moby           ][Info   ] [   79.846975] device vethc187fa4 left promiscuous mode
[16:21:39.111][Moby           ][Info   ] [   79.877069] docker0: port 1(vethc187fa4) entered disabled state
[16:21:39.397][ApiProxy       ][Info   ] time="2019-05-14T16:21:39-07:00" msg="proxy << POST /v1.39/containers/970afac23a06b4c74242d3efae1c163db501a8b59ffad7f46afa63aec9840f0c/wait?condition=removed (2.3794192s)\n"
[16:21:39.405][SambaShare     ][Error  ] Unable to mount C drive: firewall is blocking
[16:21:39.405][SambaShare     ][Info   ] Removing share C
[16:21:39.470][NamedPipeClient][Info   ] Received response for Mount
[16:21:39.469][NamedPipeServer][Info   ] Mount done in 00:00:03.4546881.

Hope this might have some people:

I was having the same issue. I had the following line in my logs:

Unable to mount C drive: 10.0.75.1 (10.0.75.1:445) open

Along with other lines related to IpV6, SambaShare and IPVS

Long story short:

The issue is related to how poorly network folder sharing is implemented in Windows. And Docker is using the folder sharing mechanism, so that might be the reason why the issue is coming up for so many people and there doesn’t seem to be a fix.

What fixed it for me (I am not sure if it’s a complete recipe, or that all of the steps are needer, but that what seemed to make it work for me):

1 - Enabling IpV6 in all network devices. It was disabled

2 - Enabling SMB 2/3 (I’ve also enabled SMB 1, but seems like Docker is using SMB 3) - it’s a network folder sharing protocols which were disabled in my system by default

3 - Enabling network sharing and disabling password protection in “Network and Internet settings” -> “Sharing options”

4 - I’ve uninstalled VmWare Player, which also removed VmWare virtual network devices.

5 - *I am not sure if it’s necessary, but at the moment it is working with a separate user without Micorosoft Account, as other advices mentioned - not sure if it’s a must, but I am not going to touch it while it works

Six hours of my life - and I have it working :slight_smile:

The solution worked for me. thanks