summaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/buildah/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/containers/buildah/run.go')
-rw-r--r--vendor/github.com/containers/buildah/run.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/containers/buildah/run.go b/vendor/github.com/containers/buildah/run.go
index f56ce30b1..2fa3cd572 100644
--- a/vendor/github.com/containers/buildah/run.go
+++ b/vendor/github.com/containers/buildah/run.go
@@ -1765,7 +1765,9 @@ func runConfigureNetwork(isolation Isolation, options RunOptions, configureNetwo
var netconf, undo []*libcni.NetworkConfigList
if isolation == IsolationOCIRootless {
- return setupRootlessNetwork(pid)
+ if ns := options.NamespaceOptions.Find(string(specs.NetworkNamespace)); ns != nil && !ns.Host {
+ return setupRootlessNetwork(pid)
+ }
}
// Scan for CNI configuration files.
confdir := options.CNIConfigDir