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:23:49 -08:00
parent 332755b99d
commit 2419e63d24
7 changed files with 422 additions and 4 deletions
+1 -1
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
+1 -1
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]
}