Docker host networking - speicify network interface

Viewed 18

I am trying to run a docker container using the --network host option on an embedded linux system. There are two eth interfaces, eth0 and eth1. The eth0 interface is used for ethernet to serial and should not be used for anything else.

Whenever I try running my container using the --network host option, docker tries to run it on the ip address of eth0. I need docker to instead run the container using the host ip address of eth1.

The only thing I have tried to get it this to work is to bring the eth0 interface down. This won't work because I need both interfaces up. I need to make this work with host networking. Is there some way to specify the interface to use when I use docker run? If not is there some way to set a constraint in linux to use eth1 for docker instead of eth0?

0 Answers
Related