How to set Windows Firewall to allow Docker for Windows to share drive?

+1 vote

Windows Firewall is blocking my attempt to allow Docker for Windows to share C: on windows 10 machine.

This works fine when Windows Firewall is down. But when it’s up, I get the following error:

A firewall is blocking file Sharing between Windows and the containers. See documentation for more info.
Aug 28, 2018 in DevOps & Agile by Sophie may
• 9,870 points
3,044 views

3 answers to this question.

+1 vote
Best answer

This is simple, you don't actually need to share the C drive but only reinstall the File and Print sharing service on the Hyper-V virtual network card.

Also if you’re facing any problem or restrictions on your network profiles, consider changing the default "unidentified network" for the "vEthernet (DockerNAT)" card to private via this PowerShell command.

Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
answered Aug 28, 2018 by Tyrion anex
• 8,280 points

selected May 7 by Kalgi
+1 vote

Drives aren't accessed directly through Windows Explorer. They are accessed through an internal virtual network called DockerNAT. So basically, even though Docker is locally installed, it accesses your C: drive over the network like this \10.0.75.1\C:\$ instead of like this C:\$.

Check the following things:

  • Check to see if the correct firewall rules are enabled. 
  • Check Connectivity
  • Check Docker network DNS settings.
  • Make sure that the DockerNAT network is trusted in your AV firewall or Endpoint protection software.

Reference: https://success.docker.com/article/error-a-firewall-is-blocking-file-sharing-between-windows-and-the-containers

answered May 7 by Manish
+1 vote

Follow these steps:

  1. First, turn off Docker (wait until completely closed)
  2. Disable Firewall
  3. Turn on Docker
  4. Share drive
answered May 7 by Sid

Related Questions In DevOps & Agile

0 votes
1 answer

How to restart docker for windows using Powershell?

Try this: $processes = Get-Process "*docker for windows*" if ...READ MORE

answered Oct 23, 2018 in DevOps & Agile by Tyrion anex
• 8,280 points
303 views
0 votes
2 answers

How to customize the RAM allocation on Docker for Windows?

Try this: docker update --cpu-shares 5120 -m 3000M ...READ MORE

answered Dec 6, 2018 in DevOps & Agile by Maverick
• 10,040 points
119 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,920 points
221 views
0 votes
1 answer

How to a run deployed app in Docker for Windows?

To deploy an ASP.NET web application to ...READ MORE

answered Aug 29, 2018 in DevOps & Agile by Tyrion anex
• 8,280 points
126 views