mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-25 17:33:50 +01:00
Add --network=none
if network_mode: none
is set; fixes #1001.
Signed-off-by: bg <bg@nerilex.org>
This commit is contained in:
parent
0866492a7e
commit
e2eb883709
@ -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
|
||||
|
@ -257,7 +257,7 @@ class TestGetNetArgs(unittest.TestCase):
|
||||
@parameterized.expand([
|
||||
("bridge", ["--network=bridge", f"--network-alias={SERVICE_NAME}"]),
|
||||
("host", ["--network=host"]),
|
||||
("none", []),
|
||||
("none", ["--network=none"]),
|
||||
("slirp4netns", ["--network=slirp4netns"]),
|
||||
("slirp4netns:cidr=10.42.0.0/24", ["--network=slirp4netns:cidr=10.42.0.0/24"]),
|
||||
("private", ["--network=private"]),
|
||||
|
Loading…
Reference in New Issue
Block a user