How to bind docker container to physical host interface

Environment

  • Docker for Windows version: 1.12.0-rc2-beta16

Challenge

There are two docker containers that runs software that use UPnP inside to communicate with the outside world. I have software on my mobile phone to test against this docker containers. But for this all Multicast commands have to be bridged 1:1 (without NAT, masquerading, etc.) directly to the physical interface of the Windows Host.

Any recommendations?

Ping! Any recommendations?

@blaubaer I assume you need port forwarding. It’s not mentioned in the docs for Docker for Windows, so not sure if it’s implemented the same way.
Regular Docker and Docker for Mac have this feature: https://docs.docker.com/docker-for-mac/networking/#/port-mapping

@amakhrov This is not enough. :frowning: Because I really need Bridging of networks. The software I’am talking about uses UPnP together with mDNS & Co. This needs to be in the same network (subnet with same broadcast and working broadcast).

Hi Gregor

unfortunately, we do not support this use case. It would require the creation of an external virtual switch two which both the external network interface as well as the VM is connected. Configuring Docker for Windows like this would very likely interfere with the networking setup users may have for other VMs, would stop users being able easily switch between wire and wireless networks, and would supporting roaming between networks a lot harder.

Rolf