Export more functions from libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
aecfa0d890
commit
2db754f3ee
5 changed files with 26 additions and 22 deletions
|
@ -142,3 +142,14 @@ func DeletePid(path string) error {
|
|||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// GetNamespaceFlags parses the container's Namespaces options to set the correct
|
||||
// flags on clone, unshare, and setns
|
||||
func GetNamespaceFlags(namespaces libcontainer.Namespaces) (flag int) {
|
||||
for _, ns := range namespaces {
|
||||
if ns.Enabled {
|
||||
flag |= ns.Value
|
||||
}
|
||||
}
|
||||
return flag
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue