title: Docker for Windows networking
body: <p>I'm having some trouble understanding Docker for Windows and how the networking works.  In VirtualBox with a bridged adapter and an Ubuntu vm, things just worked - I could ping the vm from my host (and vice versa) fine.</p>
  <ul>
  <li>How do I ping a container from any device on my network?</li>
  <li>And how do ping other containers not running on the same host?</li>
  </ul>
  <h2>My plan...</h2>
  <p>was to have multiple windows machines (not vms) each running a single Docker container (to form a storage cluster), and these containers need to talk to each other (run using <code>overlay</code> network possibly, or does this require <code>swarm</code>?).  I also need to talk to this externally, which is the only part I was able to get working, using the <code>docker run -p </code> option to expose the ports in the container I need.</p>
  <p>To elaborate my though process a bit more, my goal is to build a Amazon S3 style key value store (specifically, using Riak KV) which runs on linux.  Since this would require multiple computers running the software, it seemed to me that Docker could have benefits including, ease of setup and deployment, as well as a framework to run linux based softare on Windows, which is what I currently have easy access to.</p>
  <h2>Couple things I've tested...</h2>
  <p>If I run two Ubuntu containers on the same host using the default bridge network, they can ping each other. <code>ifconfig</code> lists a local and eth0 adapter with a 172.17... ip address.  From this, it doesn't sound like bridge is what I'm looking for, since I want multiple hosts.</p>
  <blockquote>
  <p><a href="https://docs.docker.com/v1.10/engine/userguide/networking/dockernetworks/" rel="noreferrer">relatively small network on a single host</a></p>
  </blockquote>
  <p>If I run an Ubuntu container using <code>--network host</code> I get a lot more output from <code>ifconfig</code> including &quot;br-xxxxxxxx&quot; and &quot;vethxxxxxx&quot; adapters.  From the docs,</p>
  <blockquote>
  <p>adds a container on the hosts network stack</p>
  </blockquote>
  <p>This sounded useful, but perhaps I'm not understanding. I know Docker for windows runs a MobyLinuxVM, and uses a Hyper-V adapter and switch, what is host referring to? The windows pc or this VM?  With <code>--network host</code>, I'm still unable to ping my container or ping my desktop from the container.</p>
  <h2>Other thoughts...</h2>
  <p>It seems the common use of Docker is NOT Windows based, so I've not been able to find as much to reference.  Is my use case very different from the normal use of Docker? Can anyone point out things I am missing here?</p>
  <p><a href="http://www.altaro.com/hyper-v/the-hyper-v-virtual-switch-explained-part-1/" rel="noreferrer">Reading about Hyper-V adapters</a> makes it look like I need to change my network adapter setup in addition to how I launch the containers? I guess, I'm having a hard time understanding where to look between windows, hyper-v adapter/switch, ubuntu, and docker.</p>