Support network_mode: none

Fixes #566
This commit is contained in:
Michel Jung 2023-02-10 11:37:50 +01:00 committed by Muayyad Alsadi
parent b4c0792995
commit ed2a6c0917

View File

@ -762,7 +762,9 @@ def get_net_args(compose, cnt):
is_bridge = False
net = cnt.get("network_mode", None)
if net:
if net == "host":
if net == "none":
is_bridge = False
elif net == "host":
net_args.extend(["--network", net])
elif net.startswith("slirp4netns:"):
net_args.extend(["--network", net])