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 <tophj@linux.vnet.ibm.com>
| ... | ... |
@@ -147,15 +147,25 @@ semverParse() {
|
| 147 | 147 |
} |
| 148 | 148 |
|
| 149 | 149 |
do_install() {
|
| 150 |
- case "$(uname -m)" in |
|
| 151 |
- *64) |
|
| 150 |
+ architecture=$(uname -m) |
|
| 151 |
+ case $architecture in |
|
| 152 |
+ # officially supported |
|
| 153 |
+ amd64|x86_64) |
|
| 152 | 154 |
;; |
| 155 |
+ # unofficially supported with available repositories |
|
| 153 | 156 |
armv6l|armv7l) |
| 154 | 157 |
;; |
| 158 |
+ # unofficially supported without available repositories |
|
| 159 |
+ aarch64|arm64|ppc64le|s390x) |
|
| 160 |
+ cat 1>&2 <<-EOF |
|
| 161 |
+ Error: Docker doesn't officially support $architecture and no Docker $architecture repository exists. |
|
| 162 |
+ EOF |
|
| 163 |
+ exit 1 |
|
| 164 |
+ ;; |
|
| 165 |
+ # not supported |
|
| 155 | 166 |
*) |
| 156 |
- cat >&2 <<-'EOF' |
|
| 157 |
- Error: you are not using a 64bit platform or a Raspberry Pi (armv6l/armv7l). |
|
| 158 |
- Docker currently only supports 64bit platforms or a Raspberry Pi (armv6l/armv7l). |
|
| 167 |
+ cat >&2 <<-EOF |
|
| 168 |
+ Error: $architecture is not a recognized platform. |
|
| 159 | 169 |
EOF |
| 160 | 170 |
exit 1 |
| 161 | 171 |
;; |