Docker-compose problem?

In the docker run, we generally use the –add-host = parameter with the external host to establish a connection, then use the docker-compose, I docker-compose.yml how to define the document? 2015-07-16 add comment share it

  • Weibo
  • QZONE
  • Micro letter

Did not find the relevant results

    Invited:

    Tuxknight

    We agreed from:


    This is the official description given:
    Extra_hosts
    Add hostname mappings. Use the same values ​​as the docker client –add-host parameter.

    Extra_hosts:
    – "somehost: 162.242.195.82"
    – "otherhost: 50.31.209.229"
    An entry with the ip address and hostname will be created in / etc / hosts inside containers for this service, eg:

    162.242.195.82 somehost
    50.31.209.229 otherhost

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