diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-26 23:13:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 23:13:40 +0200 |
commit | d9eb1269257490dddfae3fde2fe57c3009f94287 (patch) | |
tree | 2a05ee02a825f2024fa7151b2514f66cafe330e4 /libpod/container.go | |
parent | 5b4ffc7ba79d0c3ad59cce17500c5a98ea686577 (diff) | |
parent | 533d88b6566974c979932bab071e9408580ac7f8 (diff) | |
download | podman-d9eb1269257490dddfae3fde2fe57c3009f94287.tar.gz podman-d9eb1269257490dddfae3fde2fe57c3009f94287.tar.bz2 podman-d9eb1269257490dddfae3fde2fe57c3009f94287.zip |
Merge pull request #10447 from mheon/rootlesscni_default
Add the option of Rootless CNI networking by default
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libpod/container.go b/libpod/container.go index 591cf9bc5..c6f0cd618 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -14,7 +14,6 @@ import ( "github.com/containers/image/v5/manifest" "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/libpod/lock" - "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" spec "github.com/opencontainers/runtime-spec/specs-go" @@ -1168,7 +1167,7 @@ func (c *Container) Networks() ([]string, bool, error) { func (c *Container) networks() ([]string, bool, error) { networks, err := c.runtime.state.GetNetworks(c) if err != nil && errors.Cause(err) == define.ErrNoSuchNetwork { - if len(c.config.Networks) == 0 && !rootless.IsRootless() { + if len(c.config.Networks) == 0 && c.config.NetMode.IsBridge() { return []string{c.runtime.netPlugin.GetDefaultNetworkName()}, true, nil } return c.config.Networks, false, nil |