mirror of
https://github.com/docker/compose.git
synced 2025-07-22 13:14:29 +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)
|
command_builder.add_arg("--isolation", isolation)
|
||||||
|
|
||||||
if extra_hosts:
|
if extra_hosts:
|
||||||
for host, ip in extra_hosts.items():
|
if isinstance(extra_hosts, dict):
|
||||||
command_builder.add_arg("--add-host", "{}:{}".format(host, ip))
|
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])
|
args = command_builder.build([path])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user