Merge pull request #1104 from rjeffman/disable_dns

Add support for disable_dns, dns and ignore on network creation
This commit is contained in:
Povilas Kanapickas
2025-01-19 19:41:30 +02:00
committed by GitHub
5 changed files with 103 additions and 0 deletions

View File

@@ -832,6 +832,13 @@ def get_network_create_args(net_desc, proj_name, net_name):
ipam_config_ls = ipam.get("config", [])
if net_desc.get("enable_ipv6"):
args.append("--ipv6")
if net_desc.get("x-podman.disable_dns"):
args.append("--disable-dns")
if net_desc.get("x-podman.dns"):
args.extend((
"--dns",
",".join(norm_as_list(net_desc.get("x-podman.dns"))),
))
if isinstance(ipam_config_ls, dict):
ipam_config_ls = [ipam_config_ls]