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

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

    will become

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

    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

提交回复
热议问题