Docker for Windows – mounting shared folders

Docker has a new offering: “Docker for Windows”.
It was made available during DockerCon 2016 (June) and uses Hyper-Visor instead of VirtualBox.

The resulting user experience is very much like running Docker on Linux.

However playing around with it yesterday I ran into a slight problem:

On a Windows machine, especially a developer-machine, there’s usually some sort of anti-virus software up and running. in my case that’s Norton. And part of the package is a firewall.

This firewall causes problems.

When “Docker for Windows” shares folders it uses SMB. SMB is (at least in the case of Norton Firewall) specifically mentioned as BLOCKED in the firewall rule …. somewhere waay down the list.

So in order for your containers to actually connect – you need to open the firewall .. just a bit.

Looking in the settings (right-click the little whale swimming in your taskbar …). You can see the address and subnet mask.

Docker for Windows Network

The two ports you need to open are
* 139 (netbios-ssn)
* 445 (microsoft-ds)

What you could do is allow that traffic from any IP. But since we already know the range docker will use why not use it?

Resulting rule would be something like “Allow inbound communication on ports.

Here’s all the tabs in Norton Rule editor (which you reach by opening Norton Security Center, click Settings -> Firewall -> Traffic Rules, then “Add”).


Note the Rule will be added at the bottom, so you’ll need to select it then click “Move up” until it’s at the top.
Also make sure that there’s a nice blue “X” in the active column.

As always I hope this help someone … and feel free to rant in the comments below.

Remember to restart Docker afterwards.

Testing can be done by running

docker run --rm -v c:/:/data alpine ls /data

This entry was posted in Miscellaneous, Software development. Bookmark the permalink.

16 Responses to Docker for Windows – mounting shared folders

  1. Thank you so much! You just saved my antivirus from been deleted 😛

  2. Chris says:

    Thanks for your step by step. It is nice to see a post from someone rather than a pompus reply from someone who doesn’t want to take the time to give a decent answer. Again thank you so much!!

    • Michael Willer says:

      Glad I could help someone. Thanks for commenting. It makes my day everytime 🙂

  3. Mark P says:

    Thanks so much. This really saved me hours of time that I had spent, instead of turning off my firewall.

  4. neil South says:

    Thank you for this, I was pulling my hair out with Noton untill I found this.

  5. Luiz Fernando says:

    Thank you very much! You save my day!

  6. Jack Crews says:

    Truly a helpful post!

  7. John Dhabolt says:

    Yes, thanks for taking the time to write the article. It saved me time as well.

  8. Bill Trowbridge says:

    Perfect step by step instructions helped to get over this hump.
    Thank you so much.

    The details of which protocols/ports to open was critically important, and hard to find.

  9. Marcos Tonina says:

    Thaaaaaanks 🙂

  10. Thiago Melo Bezerra says:

    Thank you so much! You saved my life!

  11. Bill Wu says:

    While searching for an answer to this problem, the “official” Docker for Windows site and related postings only describe the nature of the problem, requiring time and effort to understand and sort through the details. Your posting saved hours of effort and frustration as I also use Norton Security. I genuinely appreciate your taking the time to explain this solution so plainly and concisely.

  12. Priya says:

    Thank you for posting step by step details. I was almost ready to delete my antivirus!

  13. Joe says:

    Works like a charm. Thank you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.