357ca32831
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
14 lines
337 B
Go
14 lines
337 B
Go
package nsinit
|
|
|
|
import (
|
|
"github.com/dotcloud/docker/pkg/libcontainer"
|
|
)
|
|
|
|
// 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 {
|
|
flag |= ns.Value
|
|
}
|
|
return flag
|
|
}
|