devplayer0 / docker-net-dhcp

Docker network driver for networking on a host bridge with DHCP-allocated IP addresses
GNU General Public License v3.0
193 stars 55 forks source link

Is it possible to set up this plugin along one interface in host mode? #28

Closed rafaelrojasmiliani closed 2 years ago

rafaelrojasmiliani commented 2 years ago

First of all, I would like to congratulate the contributors of this amazing project.

My settings are the following:

Is it possible to expose to the container one interface with dhcp connected to the 10.10.0.0 network and a second interface eth1 in host mode?

A possible solution

I think that it is possible to create a bridge and bind both eth0 and eth1 to it with brctl addif bridge0 eth0 && brctl addif bridge0 eth0 and create the network with this bridge. Then I can hope that although I have one interface exposed into the container, the bridge will route the packages to the correct interface.

rafaelrojasmiliani commented 2 years ago

Yes It is posible

It is only necessary to create a second docker network br1 associated to eth1 with its bridge and fixed IP. Then call

docker network br1 container_name