Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow use of network name for network interface #23742
Containers can be connected to several networks simultanously. The network interfaces are typically named eth0, eth1, eth2, etc. In some instances containers need to be directed to use, say, interface ethX for traffic on Docker network A, and ethY for traffic on Docker network B. Currently there is no relationship between network interface name and Docker network name.
The current (clumsy) work round (via Docker Compose) is to define an ip range per Docker network, and tell the container to use the network interface that falls in that ip range.
A better solution is the ability to name network interfaces after the Docker network name. If the container needs to use a certain network, it can be instructed to use the interface name that matches the Docker network name.
Feature request against: