diff options
author | CJ <lim@chernjie.com> | 2015-03-24 18:25:09 +0800 |
---|---|---|
committer | CJ <lim@chernjie.com> | 2015-04-24 09:21:29 +0800 |
commit | 25ee3f0033f349df9692cac943065b32be1fa4e2 (patch) | |
tree | 4d5f07b991cc20a0f565675b88aad75ca5ba695f /docs | |
parent | 8098b65576b5c8e69705d533580c1d37a09632ad (diff) |
Remove extra s from --add-host
linting...
six.string_types
list-of-strings in examples
disallow extra_hosts support for list-of-dicts
A more thorough sets of tests for extra_hosts
Provide better examples
As per @aanand's [comment](https://github.com/docker/compose/pull/1158/files#r28326312)
I think it'd be better to check `if not isinstance(extra_hosts_line,
six.string_types)` and raise an error saying `extra_hosts_config must be
either a list of strings or a string->string mapping`. We shouldn't need
to do anything special with the list-of-dicts case.
order result to work with assert
use set() instead of sort()
Signed-off-by: CJ <lim@chernjie.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/yml.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/yml.md b/docs/yml.md index 8756b202..82aeed12 100644 --- a/docs/yml.md +++ b/docs/yml.md @@ -89,19 +89,19 @@ external_links: ### extra_hosts -Add hostname mappings. Use the same values as the docker client `--add-hosts` parameter. +Add hostname mappings. Use the same values as the docker client `--add-host` parameter. ``` extra_hosts: - - docker: 162.242.195.82 - - fig: 50.31.209.229 + - "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 docker -50.31.209.229 fig +162.242.195.82 somehost +50.31.209.229 otherhost ``` ### ports |