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

  • Introduction to Marathon of DCOS
  • Docker container can not connect to other containers running Redis
  • Seven cattle custom data processing, build a mirror when apt-get update failed
  • Eighty-eight Windows Docker's interesting facts
  • I am docking on the Ali cloud lnmp configuration, use their load balance, then php has been given the error?
  • What are the uses of Rancher and RancherOS respectively?
  • 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.