From 2bc1fa895ff21e1c3d32ffef0f5b51ee49101563 Mon Sep 17 00:00:00 2001 From: Dennis Chen Date: Fri, 23 Mar 2018 06:01:48 +0000 Subject: [PATCH] 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 Upstream-commit: 803a756941f5e4b68429a3642d52585c8ea6dbaa Component: engine --- components/engine/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 7c4a8608db..8bc546bd9a 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -72,8 +72,8 @@ RUN set -x \ && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ - && case $(uname -m) in \ - x86_64|ppc64le|s390x) \ + && case $(dpkg --print-architecture) in \ + amd64|ppc64*|s390x) \ (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1"); \ GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH"; \ go build -buildmode=pie -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \