Docker swarm — container binding to ethx IP
I’m really a docker newbie, please forgive my lack of skills on specifying questions.
Now I’ve met a scene in production where I’d like to use docker swarm to connect different machines together in a docker network.
But each host machine may have multiple physical NIC(eth0, eth1, etc…), thus different IPs, and each time I orchestrate the system, I’d like to initialize a new network for each container, letting the container use a particular IP among NIC’s IP. But each container using the IP of each NIC, not under docker0.
I’ve read the doc on docker 17.06ce mentioning using
DOCKER-USER flag, but I can’t quite understand that.
Using host network is not the best option for me because that will occupy the port globally.
Thanks in advance.