From fb2b7078eb8d95f4ebcd2b992af01f4a49295707 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 25 May 2015 20:28:27 -0700 Subject: [PATCH] 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. --- docker/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/utils/utils.py b/docker/utils/utils.py index 4110017a0d..66a5433d9d 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):