Categories
Miscellaneous Software development

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”).

DfW-Norton

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

Categories
Uncategorized

YAML and Spring

I had a use case the other day where I needed to represent table metadata (simple primary and foreign keys) in program. But I also needed a way to input that data easily.

YAML to the rescue.

I’ve created a repository on github with the code. The ReadMe explains the details. ( Go to GitHub )