Files
podman/libpod/container_linux.go
Paul Holzinger bad25da92e libpod: add !remote tag
This should never be pulled into the remote client.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-24 12:11:34 +02:00

23 lines
416 B
Go

//go:build !remote
// +build !remote
package libpod
import (
spec "github.com/opencontainers/runtime-spec/specs-go"
)
func networkDisabled(c *Container) (bool, error) {
if c.config.CreateNetNS {
return false, nil
}
if !c.config.PostConfigureNetNS {
for _, ns := range c.config.Spec.Linux.Namespaces {
if ns.Type == spec.NetworkNamespace {
return ns.Path == "", nil
}
}
}
return false, nil
}