瀏覽代碼

Update to enable cross compile
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Michael Crosby 11 年之前
父節點
當前提交
83982e8b1d

+ 0 - 1
pkg/libcontainer/nsinit/init.go

@@ -84,7 +84,6 @@ func Init(container *libcontainer.Container, uncleanRootfs, consolePath string,
 	if err := label.SetProcessLabel(container.Context["process_label"]); err != nil {
 	if err := label.SetProcessLabel(container.Context["process_label"]); err != nil {
 		return fmt.Errorf("set process label %s", err)
 		return fmt.Errorf("set process label %s", err)
 	}
 	}
-
 	if err := FinalizeNamespace(container); err != nil {
 	if err := FinalizeNamespace(container); err != nil {
 		return fmt.Errorf("finalize namespace %s", err)
 		return fmt.Errorf("finalize namespace %s", err)
 	}
 	}

+ 2 - 0
pkg/libcontainer/security/restrict/restrict.go

@@ -1,3 +1,5 @@
+// +build linux
+
 package restrict
 package restrict
 
 
 import (
 import (

+ 9 - 0
pkg/libcontainer/security/restrict/unsupported.go

@@ -0,0 +1,9 @@
+// +build !linux
+
+package restrict
+
+import "fmt"
+
+func Restrict(rootfs, empty string) error {
+	return fmt.Errorf("not supported")
+}