A firewall is blocking sharing between Windows and the containers – Docker
I recently encountered this error while trying to run one of my docker setups.
I have encountered errors like this before and it has always ended up being related to docker and sharing my drives to the linux VM that actually runs my containers.
Checking the shared drives menu of the docker UI everything seemed to be fine.
However when removing the drive share and re sharing the drive I got an error message saying that there was a “Firewall detected” and that “A firewall is blocking file Sharing between Windows and the containers. See documentation for more info”.
The docs seem to suggest that my firewall rule had vanished somehow. I spent a few minutes digging around and tinkering with firewall rules before determining the rule itself was not the issue. The next suggestion was to “reinstall the File and Print sharing service on the Hyper-V virtual network card “
Opening PowerShell as administrator and running the commands suggested on stackoverflow (switching the DockerNAT network) seemed to do the trick.
I still have no idea why this happened. Did I accidently set the DockerNAT network to be public? Could the Docker UI really not check the firewall rule itself and propose the fix?