Settings to Windows Firewall to allow Docker for Windows to share drive

后端 未结 30 1407
臣服心动
臣服心动 2020-12-07 07:11

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

相关标签:
30条回答
  • 2020-12-07 08:03

    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'.

    0 讨论(0)
  • 2020-12-07 08:04

    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

    docker run -v C:/Users/kumar.joshi/KumarData:/mnt --name dev <image:latest>
    

    will become

    docker run -v C:/Users/kumar.joshi/KumarData:/mnt --name dev --publish 8000:8000 <image:latest>
    

    Make sure the port is not used else you will get this error:

    Bind for 0.0.0.0:8000 failed: port is already allocated

    0 讨论(0)
  • 2020-12-07 08:05

    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

    0 讨论(0)
  • 2020-12-07 08:05

    Using Kaspersky Internet Security you can resolve this easily if you change the vEthernet (DockerNAT) network adapter type to Trusted network.

    Settings > Protection > Firewall > Networks > vEthernet (DockerNAT) > Select "Trusted Network"

    0 讨论(0)
  • 2020-12-07 08:06

    Ok, so after running in the same issue, I have found a Solution.

    This is what I did:


    Step 1: Open ESET. Then click on Setup

    Step 2: Click on Network protection

    Step 3: Click on Troubleshooting wizard

    Step 4: Find the Communication 10.0.75.2 (Default docker IP setting) Just check what the IP Range is defined inside your docker settings. Then look for for the IP which resides in that range.

    Step 5: Click on the Unblock button, then you should receive this screen.

    This solved the issue for myself.

    You can then go to the Rules and check the rule that was added.


    PS: This is my first post, sorry for any incorrect procedures.

    0 讨论(0)
  • 2020-12-07 08:07

    You don't actually need to share the C drive but only reinstall (or potentially even uncheck - click OK - then check) the File and Print sharing service on the Hyper-V virtual network card. See this article.

    Also if there are restrictions on your network profiles (i.e. public), consider changing the default "unidentified network" for the "vEthernet (DockerNAT)" card to private via this PowerShell command before doing the above:

    Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
    
    0 讨论(0)
提交回复
热议问题