From 1f151d03d8410f6fe87622ff0bb8901dbaf7875d Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Fri, 7 Jul 2023 18:21:15 +0100 Subject: [PATCH] Dockerfile.compute-node: support arm64 (#4660) ## Problem `docker build ... -f Dockerfile.compute-node ...` fails on ARM (I'm checking on macOS). ## Summary of changes - Download the arm version of cmake on arm --- Dockerfile.compute-node | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Dockerfile.compute-node b/Dockerfile.compute-node index 7208024d6330..1b5db2af8146 100644 --- a/Dockerfile.compute-node +++ b/Dockerfile.compute-node @@ -132,10 +132,20 @@ RUN wget https://github.com/plv8/plv8/archive/refs/tags/v3.1.5.tar.gz -O plv8.ta FROM build-deps AS h3-pg-build COPY --from=pg-build /usr/local/pgsql/ /usr/local/pgsql/ -# packaged cmake is too old -RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh \ +RUN case "$(uname -m)" in \ + "x86_64") \ + export CMAKE_CHECKSUM=739d372726cb23129d57a539ce1432453448816e345e1545f6127296926b6754 \ + ;; \ + "aarch64") \ + export CMAKE_CHECKSUM=281b42627c9a1beed03e29706574d04c6c53fae4994472e90985ef018dd29c02 \ + ;; \ + *) \ + echo "Unsupported architecture '$(uname -m)'. Supported are x86_64 and aarch64" && exit 1 \ + ;; \ + esac && \ + wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-$(uname -m).sh \ -q -O /tmp/cmake-install.sh \ - && echo "739d372726cb23129d57a539ce1432453448816e345e1545f6127296926b6754 /tmp/cmake-install.sh" | sha256sum --check \ + && echo "${CMAKE_CHECKSUM} /tmp/cmake-install.sh" | sha256sum --check \ && chmod u+x /tmp/cmake-install.sh \ && /tmp/cmake-install.sh --skip-license --prefix=/usr/local/ \ && rm /tmp/cmake-install.sh