Allow extra_hosts to be a list too

The current map syntax does not allow the API equivalent of

    --add-host foo:1.1.1.1 --add-host foo:2.2.2.2

The above will map one hostname to two IPs.  The above is valid in Docker.
This commit is contained in:
Darren Shepherd 2015-05-25 20:28:27 -07:00
parent 7b2fd8cf5e
commit fb2b7078eb
1 changed files with 1 additions and 1 deletions

View File

@ -434,7 +434,7 @@ def create_host_config(
for k, v in sorted(six.iteritems(extra_hosts))
]
host_config['ExtraHosts'] = extra_hosts
host_config['ExtraHosts'] = extra_hosts
if links is not None:
if isinstance(links, dict):