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.

  • Keep an Nginx alive after a bash script
  • Best practice re running bash for attaching to Docker running instance
  • Development and production with docker with multiple sites
  • Docker: Find dockerfile of images
  • Kubernetes imagePullSecrets not working; getting “image not found”
  • Why containers network throughput is low
  • 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.

  • chef-container + chef-vault
  • Docker Externally Routable Containers
  • Debian Host: CTRL + P + Q doesn't keep container alive
  • Faillure to launch docker on OSX Yosemite
  • How to automatically remove container data from the host when rm the container?
  • With jwilder nginx-proxy, how to proxypass a subdirectory url to a specific container?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.