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: 126.96.36.199"
– "otherhost: 188.8.131.52"
An entry with the ip address and hostname will be created in / etc / hosts inside containers for this service, eg: