package userns
import "github.com/moby/sys/userns"
Package userns provides utilities to detect whether we are currently running in a Linux user namespace.
This code was migrated from libcontainer/runc, which based its implementation on code from lcx/incus.
Index ¶
Functions ¶
func RunningInUserNS ¶
func RunningInUserNS() bool
RunningInUserNS detects whether we are currently running in a Linux user namespace and memoizes the result. It returns false on non-Linux platforms.
Source Files ¶
userns.go userns_unsupported.go
- Version
- v0.1.0 (latest)
- Published
- Aug 7, 2024
- Platform
- windows/amd64
- Last checked
- 6 days ago –
Tools for package owners.