Add missing --add-host args to the build command

Signed-off-by: José Rodrigues <contact.jrodrigues@gmail.com>
This commit is contained in:
José Rodrigues 2021-02-10 15:52:11 +01:00 committed by Ulysses Souza
parent e6fcde422c
commit 72f7b086d7
1 changed files with 5 additions and 0 deletions

View File

@ -1875,6 +1875,11 @@ class _CLIBuilder:
command_builder.add_arg("--iidfile", iidfile)
command_builder.add_arg("--platform", platform)
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))
args = command_builder.build([path])
magic_word = "Successfully built "