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?
My problem was Cisco Anyconnect VPN interfered with internal docker networking
to fix this go to:
Cisco Anyconnect Settings > Preferences > check
Allow local (LAN) access when using VPN
As stated in one other answer Docker doesn't play nice with a VPN. If you're using Nordvpn you have to disable "Invisibility on LAN" and probably "Internet Kill Switch".
If you've done so it should work even with the VPN active.
This (link below) seems to be the best fix i have found so far. It is persistant across reboots. It is best explained here: https://gist.github.com/biggyspender/8b5b2ed9ff63de31045d41304e3915b3
The vEthernet network interface seems to be dynamically created each time the system is started, and it is created in the 'Public' group as opposed to in the 'Private' group (where it works). The edits in one of the Docker startup scripts (called out in the link above) automate the powershell command / fix noted by David Tesar above....
I had more luck adding the function to the script as opposed to editing the script and changing 'Internal' to 'Private'.
I tried everything listed here and on https://github.com/docker/for-win/issues/360
Nothing worked for me.
I run my dev environment on a docker container, and while on Corporate VPN (Cisco AnyConnect), I need the to mount my local drive on the container to access my project files.
Here's a docker hack that worked for me. Add
--publish 8000:8000
to your existing docker run command.So
will become
Make sure the port is not used else you will get this error:
Seem like many having this issue when running Cisco AnyConnect. I got the same problem and here is how I solved:
The cause: The subnet being used by Docker is in the list of Secured Routes managed by Cisco AnyConnect (I believe this list is managed by your VPN's admin).
The solution: Change the subnet used by Docker to not overlap with the list being managed by AnyConnect.
For example, in my case, I changed from 10.0.75.0 (which was overlapped with 10.0.0.0/8) to 172.31.0.0/28.
25 Jan 2020
It seems, it is an issue in the old versions, I installed the last version :
and it worked for me without any configuration.