3

I need to connect two containers through a bridge but I need to set their interfaces name. How can I do that?

     docker network create --subnet 192.168.100.0/24 --driver bridge br0_nw
     docker network connect --ip 192.168.100.0 br0_nw cont1
     docker network connect --ip 192.168.100.0 br0_nw cont2

Is there any option like interface-name:

     docker network connect --ip 192.168.100.0 --interface-name ethx br0_nw cont1

Thanks

alshaboti
  • 643
  • 8
  • 18
  • Might help : https://stackoverflow.com/questions/42750086/docker-compose-adding-identifier-to-network-name – Mehraj Malik Mar 01 '19 at 05:50
  • Basically, docker creates veth ten tries to change its name to eth based on the interfaces that docker knows about. But in my case, I connect a container to external ovs with eth1 which docker doesn't aware of. So it gives me this error `Error response from daemon: failed to add interface veth61751e9 to sandbox: error renaming interface "veth61751e9" to "eth1": file exists` – alshaboti Mar 01 '19 at 05:54

0 Answers0