Browse code

Remove the `uname -m` in Dockerfile

Using `dpkg --print-architecture` instead of the `uname -m` to abstract
the architecture value from the container images, which the build process
is running inside, to match exactly the behavior specified by the following
Docker file while not 'passthru' to the host.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>

Dennis Chen authored on 2018/03/23 15:01:48
Showing 1 changed files
... ...
@@ -72,8 +72,8 @@ RUN set -x \
72 72
 	&& (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \
73 73
 	&& GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \
74 74
 		go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \
75
-	&& case $(uname -m) in \
76
-		x86_64|ppc64le|s390x) \
75
+	&& case $(dpkg --print-architecture) in \
76
+		amd64|ppc64*|s390x) \
77 77
 		(cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1"); \
78 78
 		GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH"; \
79 79
 			go build -buildmode=pie -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \