Last active
December 26, 2015 07:49
-
-
Save lorenzo-stoakes/7118414 to your computer and use it in GitHub Desktop.
Patch for docker v0.7.0-rc4 to allow use on a 32-bit device, also fix missing arg to MountDevices().
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/devmapper/devmapper.go b/devmapper/devmapper.go | |
index eae4224..36fd985 100644 | |
--- a/devmapper/devmapper.go | |
+++ b/devmapper/devmapper.go | |
@@ -1,6 +1,7 @@ | |
package devmapper | |
/* | |
+#cgo CFLAGS: -D_FILE_OFFSET_BITS=64 | |
#cgo LDFLAGS: -L. -ldevmapper | |
#include <stdio.h> | |
#include <stdlib.h> | |
diff --git a/devmapper/docker-device-tool/device_tool.go b/devmapper/docker-device-tool/device_tool.go | |
index f66762d..6b8b47c 100644 | |
--- a/devmapper/docker-device-tool/device_tool.go | |
+++ b/devmapper/docker-device-tool/device_tool.go | |
@@ -44,7 +44,7 @@ func main() { | |
usage() | |
} | |
- err := devices.MountDevice(os.Args[2], os.Args[3]) | |
+ err := devices.MountDevice(os.Args[2], os.Args[3], false) | |
if err != nil { | |
fmt.Println("Can't create snap device: ", err) | |
os.Exit(1) | |
diff --git a/server.go b/server.go | |
index e1ec19a..fa07ca7 100644 | |
--- a/server.go | |
+++ b/server.go | |
@@ -1402,8 +1402,8 @@ func (srv *Server) ContainerCopy(name string, resource string, out io.Writer) er | |
} | |
func NewServer(config *DaemonConfig) (*Server, error) { | |
- if runtime.GOARCH != "amd64" { | |
- log.Fatalf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH) | |
+ if runtime.GOARCH != "amd64" && runtime.GOARCH != "386" && runtime.GOARCH != "arm" { | |
+ log.Fatalf("The docker runtime currently only supports amd64, 386 and arm (not %s). This will change in the future. Aborting.", runtime.GOARCH) | |
} | |
runtime, err := NewRuntime(config) | |
if err != nil { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment