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
- Micro letter
Did not find the relevant results
We agreed from:
This is the official description given:
Add hostname mappings. Use the same values as the docker client –add-host parameter.
– "somehost: 220.127.116.11"
– "otherhost: 18.104.22.168"
An entry with the ip address and hostname will be created in / etc / hosts inside containers for this service, eg: