mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-29 03:15:06 +01:00
slirp4netns can be used without options
Signed-off-by: Bas Zoetekouw <bas.zoetekouw@surf.nl>
This commit is contained in:
parent
9fd4cf43c1
commit
6feff244db
@ -787,7 +787,7 @@ def get_net_args(compose, cnt):
|
||||
is_bridge = False
|
||||
elif net == "host":
|
||||
net_args.append(f"--network={net}")
|
||||
elif net.startswith("slirp4netns:"):
|
||||
elif net.startswith("slirp4netns"): # Note: podman-specific network mode
|
||||
net_args.append(f"--network={net}")
|
||||
elif net.startswith("ns:"):
|
||||
net_args.append(f"--network={net}")
|
||||
|
@ -259,6 +259,7 @@ class TestGetNetArgs(unittest.TestCase):
|
||||
("bridge", ["--network=bridge", f"--network-alias={SERVICE_NAME}"]),
|
||||
("host", ["--network=host"]),
|
||||
("none", []),
|
||||
("slirp4netns", ["--network=slirp4netns"]),
|
||||
("slirp4netns:cidr=10.42.0.0/24", ["--network=slirp4netns:cidr=10.42.0.0/24"]),
|
||||
("pasta:--ipv4-only,-a,10.0.2.0", ["--network=pasta:--ipv4-only,-a,10.0.2.0"]),
|
||||
("container:my_container", ["--network=container:my_container"]),
|
||||
|
Loading…
Reference in New Issue
Block a user