Browse code

Merge pull request #36676 from arm64b/enable-criu-on-non-arm64-v2

Enable CRIU on non-amd64 architectures (v2)

Sebastiaan van Stijn authored on 2018/03/23 21:05:45
Showing 1 changed files
... ...
@@ -44,9 +44,7 @@ FROM base AS criu
44 44
 # Install CRIU for checkpoint/restore support
45 45
 ENV CRIU_VERSION 3.6
46 46
 # Install dependancy packages specific to criu
47
-RUN case $(uname -m) in \
48
-    x86_64) \
49
-	apt-get update && apt-get install -y \
47
+RUN apt-get update && apt-get install -y \
50 48
 	libnet-dev \
51 49
 	libprotobuf-c0-dev \
52 50
 	libprotobuf-dev \
... ...
@@ -59,13 +57,7 @@ RUN case $(uname -m) in \
59 59
 	&& curl -sSL https://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \
60 60
 	&& cd /usr/src/criu \
61 61
 	&& make \
62
-	&& make PREFIX=/opt/criu install-criu ;\
63
-	;; \
64
-    armv7l|aarch64|ppc64le|s390x) \
65
-	mkdir -p /opt/criu; \
66
-	;; \
67
-    esac
68
-
62
+	&& make PREFIX=/opt/criu install-criu
69 63
 
70 64
 FROM base AS registry
71 65
 # Install two versions of the registry. The first is an older version that
... ...
@@ -80,8 +72,8 @@ RUN set -x \
80 80
 	&& (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \
81 81
 	&& GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \
82 82
 		go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \
83
-	&& case $(uname -m) in \
84
-		x86_64|ppc64le|s390x) \
83
+	&& case $(dpkg --print-architecture) in \
84
+		amd64|ppc64*|s390x) \
85 85
 		(cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1"); \
86 86
 		GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH"; \
87 87
 			go build -buildmode=pie -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \