I'm having trouble understanding Docker for Windows and how the network works. In VirtualBox with the bridge adapter and Ubuntu vm, everything just worked - I could ping vm from my host (and vice versa) in order.
- How do I ping a container from any device on my network?
- And how does ping other containers not work on the same host?
My plan...
had to have several window machines (not vms), each of which started one Docker container (to form a storage cluster), and these containers should talk to each other (perhaps using the overlay network or does this require swarm ?). I also need to talk to this from the outside, which is the only part I was able to work with, using the docker run -p option to display the ports in the container I need.
To develop my process at least a little, my goal is to create an Amazon S3 style key value store (in particular, using Riak KV) that runs on Linux. Since this would require several computers running the software, it seemed to me that Docker could have advantages, including ease of setup and deployment, as well as a platform for running linux based on Windows software, which I currently have Time has easy access.
A couple of things I tested ...
If I run two Ubuntu containers on the same host using the default bridge network, they can ping each other. ifconfig contains a local and eth0 adapter with the address 172.17 ... ip. From this, it doesn't look like a bridge is what I'm looking for, since I want multiple hosts.
relatively small network on one host
If I start the Ubuntu container using --network host , I get a lot more results from ifconfig , including the adapters "br-xxxxxxxx" and "thank youxxxxx". From the documents
adds a container to the network stack of hosts
It sounded useful, but maybe I don't get it. I know that Docker for Windows launches MobyLinuxVM and uses a Hyper-V adapter and switch, what does the host refer to? Windows pc or this virtual machine? With --network host I still cannot ping my container or ping my desktop from the container.
Other thoughts ...
It seems that the normal use of Docker is not based on Windows OS, so I could not find so many links. Is my use case different from normal use of Docker? Can anyone point out what I'm missing here?
Reading about Hyper-V adapters makes me wonder how I need to change my network adapter settings in addition to how I start containers? I guess it's hard for me to figure out where to look for windows, hyper-v adapter / switch, ubuntu and docker.