From 6d5a2dc4f9587bb1b268fcfc5920ae718aeadbb0 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 27 Oct 2016 14:44:40 -0400 Subject: [PATCH] Fix install script for multiarch The current check for uname -m just looks for *64 which hits a lot more cases than it should (mips for ex), and ignores a few that it shouldn't. This check will run the install script if on a supported architecture (x86_64 or amd64) or an unofficial one with a docker repository (armv6l or armv7l) and will give a more accurate error on an unofficial 64-bit architecture that isn't in the docker repository. Signed-off-by: Christopher Jones Upstream-commit: 28bdf08e0a13c34d765b5db90b552ed6fc3fd459 Component: engine --- components/engine/hack/install.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/components/engine/hack/install.sh b/components/engine/hack/install.sh index fe0989393a..6853ade833 100644 --- a/components/engine/hack/install.sh +++ b/components/engine/hack/install.sh @@ -147,15 +147,25 @@ semverParse() { } do_install() { - case "$(uname -m)" in - *64) + architecture=$(uname -m) + case $architecture in + # officially supported + amd64|x86_64) ;; + # unofficially supported with available repositories armv6l|armv7l) ;; + # unofficially supported without available repositories + aarch64|arm64|ppc64le|s390x) + cat 1>&2 <<-EOF + Error: Docker doesn't officially support $architecture and no Docker $architecture repository exists. + EOF + exit 1 + ;; + # not supported *) - cat >&2 <<-'EOF' - Error: you are not using a 64bit platform or a Raspberry Pi (armv6l/armv7l). - Docker currently only supports 64bit platforms or a Raspberry Pi (armv6l/armv7l). + cat >&2 <<-EOF + Error: $architecture is not a recognized platform. EOF exit 1 ;;