Merge pull request #1158 from chernjie/addhosts

Add extra_hosts to yml configuration --add-hosts
This commit is contained in:
Aanand Prasad 2015-04-27 12:26:29 +01:00
commit 16f8106149
4 changed files with 111 additions and 1 deletions

View file

@ -87,6 +87,23 @@ external_links:
- project_db_1:postgresql
```
### 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, e.g:
```
162.242.195.82 somehost
50.31.209.229 otherhost
```
### ports
Expose ports. Either specify both ports (`HOST:CONTAINER`), or just the container