From 4097ec633b5fae6137ccf9f93f7646258d304f3e Mon Sep 17 00:00:00 2001 From: Kao Makino Date: Thu, 18 Mar 2021 09:52:53 -0700 Subject: [PATCH] Add aarch64 support in CentOS7 Dockerfile (#4483) --- build/docker/centos7/build/Dockerfile | 29 +++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/build/docker/centos7/build/Dockerfile b/build/docker/centos7/build/Dockerfile index f7e5149c43..133cab010d 100644 --- a/build/docker/centos7/build/Dockerfile +++ b/build/docker/centos7/build/Dockerfile @@ -32,13 +32,21 @@ RUN rpmkeys --import mono-project.com.rpmkey.pgp && \ lz4-devel \ lz4-static \ mono-devel \ - rh-python36 \ - rh-python36-python-devel \ - rh-ruby26 \ rpm-build \ tcl-devel \ unzip \ wget && \ + if [ "$(uname -p)" == "aarch64" ]; then \ + yum install -y \ + rh-python38 \ + rh-python38-python-devel \ + rh-ruby27; \ + else \ + yum install -y \ + rh-python36 \ + rh-python36-python-devel \ + rh-ruby26; \ + fi && \ yum clean all && \ rm -rf /var/cache/yum @@ -69,8 +77,13 @@ RUN source /opt/rh/devtoolset-8/enable && \ rm -rf /tmp/* # install cmake -RUN curl -Ls https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.tar.gz -o cmake.tar.gz && \ - echo "563a39e0a7c7368f81bfa1c3aff8b590a0617cdfe51177ddc808f66cc0866c76 cmake.tar.gz" > cmake-sha.txt && \ +RUN if [ "$(uname -p)" == "aarch64" ]; then \ + curl -Ls https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6-Linux-aarch64.tar.gz -o cmake.tar.gz; \ + echo "69ec045c6993907a4f4a77349d0a0668f1bd3ce8bc5f6fbab6dc7a7e2ffc4f80 cmake.tar.gz" > cmake-sha.txt; \ + else \ + curl -Ls https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.tar.gz -o cmake.tar.gz; \ + echo "563a39e0a7c7368f81bfa1c3aff8b590a0617cdfe51177ddc808f66cc0866c76 cmake.tar.gz" > cmake-sha.txt; \ + fi && \ sha256sum -c cmake-sha.txt && \ mkdir cmake && \ tar --strip-components 1 --no-same-owner --directory cmake -xf cmake.tar.gz && \ @@ -185,7 +198,11 @@ RUN source /opt/rh/devtoolset-8/enable && \ # build/install distcc RUN source /opt/rh/devtoolset-8/enable && \ - source /opt/rh/rh-python36/enable && \ + if [ "$(uname -p)" == "aarch64" ]; then \ + source /opt/rh/rh-python38/enable; \ + else \ + source /opt/rh/rh-python36/enable; \ + fi && \ curl -Ls https://github.com/distcc/distcc/archive/v3.3.5.tar.gz -o distcc.tar.gz && \ echo "13a4b3ce49dfc853a3de550f6ccac583413946b3a2fa778ddf503a9edc8059b0 distcc.tar.gz" > distcc-sha256.txt && \ sha256sum -c distcc-sha256.txt && \