I have two public IP addresses in the same server eth0 and eth0:0.
And I have two containers that I would like them to listen on the same port but not on the same public address. My two containers are attached to the docker0
that I have :
- eth0 =192.xx.xx.50
- eth0:0 =192.xx.xx.51
- container1 = 172.17.0.5 ---------> 192.xx.xx.50:443
- container2 = 172.17.0.6 ---------> 192.xx.xx.50:9443
what I want :
- eth0 =192.xx.xx.50
- eth0:0 =192.xx.xx.51
- container 1 = 172.17.0.5 ---------> 192.xx.xx.50:443
- container 2 = 172.17.0.6 ---------> 192.xx.xx.51:443
How should I proceed to find a solution?
- create a new docker network? how to allocate it to the second ip address?
- other solutions ?
THANKS