Skip to content

Commit

Permalink
Ignore creating networks on network_mode=bridge.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
lisongmin authored and p12tic committed Dec 21, 2024
1 parent 5564224 commit 346f7a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 346f7a5

Please sign in to comment.