Docker swarm when using overlay network, how to do service discovery

Such as service A call service B, after deployment, A and B in an overlay network, that A how to know B's IP

  • DaoCloud Toolbox officially released, to enhance the domestic user Docker experience
  • How to let the docker run as a daemon / bin / bash
  • Summary of Docker Workflow Series
  • How the program is executed
  • "High speed download" DockerCon 2015 video & PPT full version
  • How is Docker used?
  • One Solution collect form web for “Docker swarm when using overlay network, how to do service discovery”

     docker service create --network docker-net --name mysql mysql docker service create --network docker-net --name webapp mywebapp:3.0 

    In this case, you can directly in the webapp service with mysql: 3306 access to mysql

    Heads up! This alert needs your attention, but it's not super important.