summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Shepherd <darren@rancher.com>2015-05-25 20:28:27 -0700
committerDarren Shepherd <darren@rancher.com>2015-05-27 08:46:14 -0700
commitfb2b7078eb8d95f4ebcd2b992af01f4a49295707 (patch)
tree3dec5a1d0a97c951b1bba5cf3d8d10b5696e9ea4
parent7b2fd8cf5ef3bbcbecd190eba39a33b3708ff33b (diff)
downloaddocker-py-fb2b7078eb8d95f4ebcd2b992af01f4a49295707.tar.gz
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.
-rw-r--r--docker/utils/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 4110017..66a5433 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -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):