Add --network=none if network_mode: none is set; fixes #1001.

Signed-off-by: bg <bg@nerilex.org>
This commit is contained in:
bg
2024-07-15 15:13:37 +02:00
committed by Povilas Kanapickas
parent 0866492a7e
commit e2eb883709
2 changed files with 2 additions and 1 deletions

View File

@@ -876,6 +876,7 @@ def get_net_args(compose, cnt):
if net:
if net == "none":
is_bridge = False
net_args.append("--network=none")
elif net == "host":
net_args.append(f"--network={net}")
elif net.startswith("slirp4netns"): # Note: podman-specific network mode