Initial commit of libcontainer running docker

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-02-21 17:11:57 -08:00
parent fa64bff715
commit d2fa488fa2
2 changed files with 2 additions and 2 deletions

View file

@ -227,7 +227,7 @@ func createCommand(container *libcontainer.Container, console, logFile string, p
"init"}, args...)...)
command.SysProcAttr = &syscall.SysProcAttr{
Cloneflags: uintptr(getNamespaceFlags(container.Namespaces)),
Cloneflags: uintptr(GetNamespaceFlags(container.Namespaces)),
}
command.Env = container.Env
return command

View file

@ -28,7 +28,7 @@ var namespaceFileMap = map[libcontainer.Namespace]string{
// getNamespaceFlags parses the container's Namespaces options to set the correct
// flags on clone, unshare, and setns
func getNamespaceFlags(namespaces libcontainer.Namespaces) (flag int) {
func GetNamespaceFlags(namespaces libcontainer.Namespaces) (flag int) {
for _, ns := range namespaces {
flag |= namespaceMap[ns]
}