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:
parent
fa64bff715
commit
d2fa488fa2
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue