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

后端 未结 30 1416
臣服心动
臣服心动 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:01

    For Windows 10 machines on domain networks, when creating the Hyper-V virtual Ethernet adapter, it gets categorized as a public network. You have to change it to a private network to allow the more relaxed Windows Firewall rules, and therefore allow file sharing.

    Run the following command in PowerShell:

    Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
    

    Change the name in quotes if your machine's virtual Hyper-V network connection is called something else.

提交回复
热议问题