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.

  • Cannot use Version 2 docker-compose files on Vagrant
  • Docker, monitoring container status, alerts
  • Connecting to Docker API with curl
  • Selenium in docker container WebDriverException: Message: connection refused
  • docker bind-mounting a managed volume
  • automatically start /etc/init script in IBM Bluemix container
  • 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.

  • Using Docker to build an image for Node, my Express based Node app, MongoDb, and NodeBB, connected via Passport
  • Can't build Dockerfile -: Not a directory Error using ADD command
  • how to dump data to the database at startup
  • Advantages of a Dockerfile
  • Simple REST web server in docker container
  • Adding docker container to running OpenShift pod
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.