How to handle two containers call each other by name

If the two containers call each other through the name of the other api, respectively, start with a similar: docker xxx –name s1 – link s2: s2 xxx and docker xxx – name s2 – link s1: s1 xxx how to deal with this situation? There is always a container first start to get another name of the container? – Note: want to visit each other through name: s1, s2 2015-03-17 add comment share it

  • Weibo
  • QZONE
  • Micro letter

Did not find the relevant results

    Invited:

    Hmonkey

    We agreed from:


    Docker xxx –name s1 xxx
    Docker xxx –name s2 – link s1: s1 xxx
    Then to s1, modify the hosts list to add
    S2 ip s2
    that's it.

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