After creating a new network with:
docker network create test-net
and running ifconfig
on the host, a new interface name is being listed:
br-f2b630e4e141 Link encap:Ethernet HWaddr 02:42:48:fe:cb:86
inet addr:172.18.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Is there a way to create this network and specify the iface name, for example docker1 or test-net?
In case of
docker-compose
, can we also specify iface name inside thedocker-compose.yml
file?