Last active
December 27, 2015 03:38
-
-
Save petrosagg/7260553 to your computer and use it in GitHub Desktop.
Patch for docker to run on ARM architecture
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/contrib/mkimage-debian.sh b/contrib/mkimage-debian.sh | |
index c1abd4f..7dcf6e3 100755 | |
--- a/contrib/mkimage-debian.sh | |
+++ b/contrib/mkimage-debian.sh | |
@@ -34,7 +34,7 @@ set -x | |
# bootstrap | |
mkdir -p "$target" | |
-sudo debootstrap --verbose --variant="$variant" --include="$include" "$suite" "$target" "$mirror" | |
+sudo debootstrap --verbose --arch=armhf --keyring=/root/.gnupg/pubring.gpg --variant="$variant" --include="$include" "$suite" "$target" "$mirror" | |
cd "$target" | |
diff --git a/server.go b/server.go | |
index 27d1968..c6eeb37 100644 | |
--- a/server.go | |
+++ b/server.go | |
@@ -1303,7 +1303,7 @@ func (srv *Server) ContainerCopy(name string, resource string, out io.Writer) er | |
} | |
func NewServer(flGraphPath string, autoRestart, enableCors bool, dns ListOpts) (*Server, error) { | |
- if runtime.GOARCH != "amd64" { | |
+ if runtime.GOARCH != "amd64" && runtime.GOARCH != "arm" { | |
log.Fatalf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH) | |
} | |
runtime, err := NewRuntime(flGraphPath, autoRestart, dns) |
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/Dockerfile b/Dockerfile | |
index 9bfa266..0977c8b 100644 | |
--- a/Dockerfile | |
+++ b/Dockerfile | |
@@ -24,11 +24,11 @@ | |
# | |
docker-version 0.6.1 | |
-from ubuntu:12.04 | |
+from raspbian:wheezy | |
maintainer Solomon Hykes <solomon@dotcloud.com> | |
# Build dependencies | |
-run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list | |
+# run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list | |
run apt-get update | |
run apt-get install -y -q curl | |
run apt-get install -y -q git | |
@@ -55,7 +55,7 @@ run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_ | |
# Runtime dependencies | |
run apt-get install -y -q iptables | |
run apt-get install -y -q lxc | |
-run apt-get install -y -q aufs-tools | |
+# run apt-get install -y -q aufs-tools | |
volume /var/lib/docker | |
workdir /go/src/github.com/dotcloud/docker | |
diff --git a/engine/engine.go b/engine/engine.go | |
index 8d67242..ad859d4 100644 | |
--- a/engine/engine.go | |
+++ b/engine/engine.go | |
@@ -35,7 +35,7 @@ type Engine struct { | |
// behavior. | |
func New(root string) (*Engine, error) { | |
// Check for unsupported architectures | |
- if runtime.GOARCH != "amd64" { | |
+ if runtime.GOARCH != "amd64" && runtime.GOARCH != "arm" { | |
return nil, fmt.Errorf("The docker runtime currently only supports amd64 (not %s). This will change in the future. Aborting.", runtime.GOARCH) | |
} | |
// Check for unsupported kernel versions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment