Blog About Me Posts By Tags Subscribe Elastic Search My Sessions Terraform

Pavan Kumar Aryasomayajulu


A firewall is blocking file Sharing between Windows and the containers

Error: Docker: A firewall is blocking file Sharing between Windows and the containers. See documentation for more info

Shared drives require port 445 to be open between the host machine and the virtual machine that runs Linux containers. Docker detects if port 445 is closed and shows the following message when you try to add a shared drive:

Description: This is the error I am getting when I actually try to share C:\ and D:\ of my PC in Docker.




Fix:

  1. I verified windows firewall settings and I didnt actually find an issue over there and my kaspersky is also not a culprit nor my VPN.
  2. Go to Hyper-V Manager -> Virtual Switch Manager -> DockerNAT -> Connection Type: change from internal to private, apply, change back to internal, apply
  3. Restart MobyLinuxVM
  4. Restart Docker
  5. Set Docker network profile to ‘Private’ ( Below command is supposed to be executed in powershell in admin mode
    Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
  6. Navigate to Control Panel\Network and Internet\Network Connections… Right click on “vEthernet (DockerNAT)” and click on Properties
  7. Reset File and Printer Sharing for Microsoft Networks on DockerNAT connection by unchecking it
  8. Go to Docker -> Settings -> Shared Drives and share C:



Thanks,
Pavan Kumar Aryasomayajulu

Keywords: Docker, DockerForWindows

#Docker #DockerWindows