Windows Firewall is blocking my attempt to allows Docker for Windows to share C: on windows 10 machine.
Works fine when Windows Firewall off. When its on I get
A firewall is blocking file Sharing between Windows and the containers. See documentation for more info.
The documentation says
You do not need to open port 445 on any other network. By default, allow connections to 10.0.75.1 port 445 (the Windows host) from 10.0.75.2 (the virtual machine).
I am "googled out" on trying to find how to do that - can someone advise?
In my case, I disabled "Block TCP 445" on Windows Defender Firewall with Advanced Security and it worked. Then enabled it again after setting shared drives on Docker.
In short, use the Edge version.
The Edge version of Docker for Windows since 2.1.5.0 (2019-11-04) has a new implementation of file sharing without requiring firewall modifications https://docs.docker.com/docker-for-windows/edge-release-notes/
"New file sharing implementation: Docker Desktop introduces a new file sharing implementation which uses gRPC, FUSE, and Hypervisor sockets instead of Samba, CIFS, and Hyper-V networking. The new implementation offers improved I/O performance. Additionally, when using the new file system:
"
You can download the edge version: https://download.docker.com/win/edge/Docker%20Desktop%20Installer.exe
Note as of now, the edge version of 2.1.7.0 will be used for next stable release: "Note: Docker Desktop Edge 2.1.7.0 is the release candidate for the upcoming major Stable release.". So the risk of using Edge is relatively low. Or you can wait for next stable release, to avoid all these firewall issues.
My C drive stopped being shared with Docker after a recent Windows 10 update. I was getting the same problem saying it was blocked by the Windows firewall when attempting to reshare it.
Looking through the above solutions, I found something that worked for me that is simpler than anything else I saw on this page. In Control Panel\All Control Panel Items\Network and Sharing Center, on the vEthernet (DockerNAT) connection, I unchecked the property File and Printer Sharing for Microsoft Networks and saved the setting. Then I checked the property again to reenable it and saved it again.
At this point, I was able to reshare the C drive in Docker settings. I have no idea why this worked but it was not a firewall problem, which already have an entry for DockerSmbMount.
I had the same problem and tried all the fixes - and it turned out that more than one was necessary:
I've written a full explanation at http://kajabity.com/2017/08/unblock-docker-for-windows-firewall-issues-with-host-volumes/
None of the above worked for me.
What finally did the trick was opening the properties of the "vEthernet (DockerNAT)" network and ticking the box "Hyper-V Extensible Virtual Switch" at the bottom of the list under the "Networking" tab.
Not sure if this is the actual fix or whether it just somehow reset the network adapter for me... but it worked!
My solution was to disconnect from the VPN; that was causing the issue