forked from extern/podman-compose
#512: only use --net when bridge
This commit is contained in:
parent
265e0ca32a
commit
f674ab8cfb
@ -757,12 +757,12 @@ def get_net_args(compose, cnt):
|
|||||||
other_cnt = net.split(":", 1)[1].strip()
|
other_cnt = net.split(":", 1)[1].strip()
|
||||||
net_args.extend(["--network", f"container:{other_cnt}"])
|
net_args.extend(["--network", f"container:{other_cnt}"])
|
||||||
elif net.startswith("bridge"):
|
elif net.startswith("bridge"):
|
||||||
is_bridge=True
|
is_bridge = True
|
||||||
else:
|
else:
|
||||||
print(f"unknown network_mode [{net}]")
|
print(f"unknown network_mode [{net}]")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
is_bridge=True
|
is_bridge = True
|
||||||
proj_name = compose.project_name
|
proj_name = compose.project_name
|
||||||
default_net = compose.default_net
|
default_net = compose.default_net
|
||||||
nets = compose.networks
|
nets = compose.networks
|
||||||
|
Loading…
Reference in New Issue
Block a user