Ignore creating networks on network_mode=bridge.

When using bridge mode, podman-compose will use the default `podman` network.
We do not need to create this network, so just return as other network_mode.

Signed-off-by: Songmin Li <lisongmin@protonmail.com>
This commit is contained in:
Songmin Li 2024-12-19 10:44:29 +08:00 committed by Povilas Kanapickas
parent 55642247e3
commit 346f7a57f0

View File

@ -855,7 +855,7 @@ async def assert_cnt_nets(compose, cnt):
create missing networks
"""
net = cnt.get("network_mode")
if net and not net.startswith("bridge"):
if net:
return
cnt_nets = cnt.get("networks")