mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
Merge pull request #12948 from Luap99/rootless-networking
Remove rootless_networking option from containers.conf
This commit is contained in:
@ -243,7 +243,6 @@ ExecStart=/usr/bin/sleep infinity
|
|||||||
`
|
`
|
||||||
containers := `[containers]
|
containers := `[containers]
|
||||||
netns="bridge"
|
netns="bridge"
|
||||||
rootless_networking="cni"
|
|
||||||
`
|
`
|
||||||
rootContainers := `[engine]
|
rootContainers := `[engine]
|
||||||
machine_enabled=true
|
machine_enabled=true
|
||||||
|
@ -353,11 +353,11 @@ func ParseNetworkFlag(networks []string) (Namespace, map[string]types.PerNetwork
|
|||||||
toReturn.NSMode = FromPod
|
toReturn.NSMode = FromPod
|
||||||
case ns == "" || ns == string(Default) || ns == string(Private):
|
case ns == "" || ns == string(Default) || ns == string(Private):
|
||||||
// Net defaults to Slirp on rootless
|
// Net defaults to Slirp on rootless
|
||||||
if rootless.IsRootless() && containerConfig.Containers.RootlessNetworking != "cni" {
|
if rootless.IsRootless() {
|
||||||
toReturn.NSMode = Slirp
|
toReturn.NSMode = Slirp
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// if not slirp we use bridge
|
// if root we use bridge
|
||||||
fallthrough
|
fallthrough
|
||||||
case ns == string(Bridge), strings.HasPrefix(ns, string(Bridge)+":"):
|
case ns == string(Bridge), strings.HasPrefix(ns, string(Bridge)+":"):
|
||||||
toReturn.NSMode = Bridge
|
toReturn.NSMode = Bridge
|
||||||
|
Reference in New Issue
Block a user