mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Merge pull request #8187 from aiordache/build_opts
Fix build.extra_hosts list format
This commit is contained in:
commit
551f680751
@ -1877,8 +1877,10 @@ class _CLIBuilder:
|
||||
command_builder.add_arg("--isolation", isolation)
|
||||
|
||||
if extra_hosts:
|
||||
for host, ip in extra_hosts.items():
|
||||
command_builder.add_arg("--add-host", "{}:{}".format(host, ip))
|
||||
if isinstance(extra_hosts, dict):
|
||||
extra_hosts = ["{}:{}".format(host, ip) for host, ip in extra_hosts.items()]
|
||||
for host in extra_hosts:
|
||||
command_builder.add_arg("--add-host", "{}".format(host))
|
||||
|
||||
args = command_builder.build([path])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user