Hi,
using Docker version 23.0.0 (API version 1.42).
using Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0 x86_64).
my network config shows that I have got 2 public IPv4s (and I would like to use both of them for 2 duplicated containers/dockers, so each will use a different IP).
the network config is:
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:9d:76:07:42 txqueuelen 0 (Ethernet)
RX packets 520889 bytes 74507880 (74.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 509268 bytes 281414710 (281.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0venet0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP> mtu 1500
inet 127.0.0.1 netmask 255.255.255.255 broadcast 0.0.0.0 destination 127.0.0.1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC)
RX packets 1667193 bytes 709308452 (709.3 MB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 1726381 bytes 204244032 (204.2 MB)
TX errors 0 dropped 4278 overruns 0 carrier 0 collisions 0venet0:0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP> mtu 1500
inet xx.xx.xx.xx netmask 255.255.255.0 broadcast 2.56.116.255 destination xx.xx.xx.xx
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC)venet0:1: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP> mtu 1500
inet xx.yy.yy.yy netmask 255.255.255.0 broadcast 45.150.19.255 destination xx.yy.yy.yy
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC)veth559a670: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 96:af:3d:01:71:85 txqueuelen 0 (Ethernet)
RX packets 32074 bytes 3151758 (3.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31990 bytes 13192381 (13.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0veth7f7dab2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 0e:ab:7c:6a:44:82 txqueuelen 0 (Ethernet)
RX packets 16102 bytes 21980784 (21.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 21922 bytes 4579149 (4.5 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0vethbd21ca5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 6a:cf:1b:6c:d7:f3 txqueuelen 0 (Ethernet)
RX packets 59714 bytes 8580337 (8.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 70255 bytes 28744673 (28.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
right now when I install the 2nd docker, it uses the same default IPv4 (venet0:0).
how do I force the 2nd to use the other IP? (venet0:1)
Thank you!