ソースを参照

HADOOP-19540. [JDK17] Add ubuntu:noble as a build platform with JDK-17 as default (#7608)

1. Added "ubuntu:noble" to supported docker platforms.
2. Modified `start-build-env.sh` to use expected Dockerfiles dynamically.
   ex: `bash start-build-env.sh ubuntu_24` where `ubuntu_24` is the extra suffix in the name of the Dockerfile.
3. Added `jdk17++` profile activated when jdk17 is available.

Successfully built the entire Hadoop tar with native support on env created using `bash start-build-env.sh ubuntu_24`
Vinayakumar B 1 ヶ月 前
コミット
5279af9b2f

+ 5 - 1
BUILDING.txt

@@ -29,7 +29,11 @@ This requires a recent version of docker (1.4.1 and higher are known to work).
 On Linux / Mac:
 On Linux / Mac:
     Install Docker and run this command:
     Install Docker and run this command:
 
 
-    $ ./start-build-env.sh
+    $ ./start-build-env.sh [OS platform]
+
+   - [OS Platform] One of [centos_7, centos_8, debian_10, ubuntu_20, ubuntu_24, windows_10].
+        Default is 'ubuntu_20'.
+        Note: Currently only default ('ubuntu_20') is supported on arm machine
 
 
 The prompt which is then presented is located at a mounted version of the source tree
 The prompt which is then presented is located at a mounted version of the source tree
 and all required tools for testing and building have been installed and configured.
 and all required tools for testing and building have been installed and configured.

+ 106 - 0
dev-support/docker/Dockerfile_ubuntu_24

@@ -0,0 +1,106 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Dockerfile for installing the necessary dependencies for building Hadoop.
+# See BUILDING.txt.
+
+FROM ubuntu:noble
+
+WORKDIR /root
+
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+
+#####
+# Disable suggests/recommends
+#####
+RUN echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras
+RUN echo APT::Install-Suggests "0"\; >>  /etc/apt/apt.conf.d/10disableextras
+
+ENV DEBIAN_FRONTEND noninteractive
+ENV DEBCONF_TERSE true
+
+######
+# Platform package dependency resolver
+######
+COPY pkg-resolver pkg-resolver
+RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
+    && chmod a+r pkg-resolver/*.json
+
+######
+# Install packages from apt
+######
+# hadolint ignore=DL3008,SC2046
+RUN apt-get -q update \
+    && apt-get -q install -y --no-install-recommends wget apt-transport-https gpg gpg-agent gawk ca-certificates \
+    && apt-get -q install -y --no-install-recommends python3 \
+    && echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" > /etc/apt/sources.list.d/adoptium.list \
+    && wget -q -O - https://packages.adoptium.net/artifactory/api/gpg/key/public > /etc/apt/trusted.gpg.d/adoptium.asc  \
+    && apt-get -q update \
+    && apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py ubuntu:noble) \
+    && apt-get clean \
+    && update-java-alternatives -s java-1.17.0-openjdk-amd64 \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN locale-gen en_US.UTF-8
+ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
+ENV PYTHONIOENCODING=utf-8
+
+######
+# Set env vars required to build Hadoop
+######
+ENV MAVEN_HOME /usr
+# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
+ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
+
+#######
+# Set env vars for SpotBugs 4.2.2
+#######
+ENV SPOTBUGS_HOME /opt/spotbugs
+
+#######
+# Set env vars for Google Protobuf 3.21.12
+#######
+ENV PROTOBUF_HOME /opt/protobuf
+ENV PATH "${PATH}:/opt/protobuf/bin"
+
+###
+# Avoid out of memory errors in builds
+###
+ENV MAVEN_OPTS -Xms256m -Xmx3072m
+
+# Skip gpg verification when downloading Yetus via yetus-wrapper
+ENV HADOOP_SKIP_YETUS_VERIFICATION true
+
+####
+# Install packages
+####
+RUN pkg-resolver/install-spotbugs.sh ubuntu:noble
+RUN pkg-resolver/install-boost.sh ubuntu:noble
+RUN pkg-resolver/install-protobuf.sh ubuntu:noble
+RUN pkg-resolver/install-hadolint.sh ubuntu:noble
+RUN pkg-resolver/install-intel-isa-l.sh ubuntu:noble
+
+###
+# Everything past this point is either not needed for testing or breaks Yetus.
+# So tell Yetus not to read the rest of the file:
+# YETUS CUT HERE
+###
+
+# Add a welcome message and environment checks.
+COPY hadoop_env_checks.sh /root/hadoop_env_checks.sh
+RUN chmod 755 /root/hadoop_env_checks.sh
+# hadolint ignore=SC2016
+RUN echo '${HOME}/hadoop_env_checks.sh' >> /root/.bashrc

+ 65 - 1
dev-support/docker/pkg-resolver/packages.json

@@ -3,17 +3,20 @@
     "debian:10": "ant",
     "debian:10": "ant",
     "ubuntu:focal": "ant",
     "ubuntu:focal": "ant",
     "ubuntu:focal::arch64": "ant",
     "ubuntu:focal::arch64": "ant",
+    "ubuntu:noble": "ant",
     "centos:7": "ant",
     "centos:7": "ant",
     "centos:8": "ant"
     "centos:8": "ant"
   },
   },
   "apt-utils": {
   "apt-utils": {
     "debian:10": "apt-utils",
     "debian:10": "apt-utils",
     "ubuntu:focal": "apt-utils",
     "ubuntu:focal": "apt-utils",
+    "ubuntu:noble": "apt-utils",
     "ubuntu:focal::arch64": "apt-utils"
     "ubuntu:focal::arch64": "apt-utils"
   },
   },
   "automake": {
   "automake": {
     "debian:10": "automake",
     "debian:10": "automake",
     "ubuntu:focal": "automake",
     "ubuntu:focal": "automake",
+    "ubuntu:noble": "automake",
     "ubuntu:focal::arch64": "automake",
     "ubuntu:focal::arch64": "automake",
     "centos:7": "automake",
     "centos:7": "automake",
     "centos:8": "automake"
     "centos:8": "automake"
@@ -24,11 +27,13 @@
   "bats": {
   "bats": {
     "debian:10": "bats",
     "debian:10": "bats",
     "ubuntu:focal": "bats",
     "ubuntu:focal": "bats",
+    "ubuntu:noble": "bats",
     "ubuntu:focal::arch64": "bats"
     "ubuntu:focal::arch64": "bats"
   },
   },
   "build-essential": {
   "build-essential": {
     "debian:10": "build-essential",
     "debian:10": "build-essential",
     "ubuntu:focal": "build-essential",
     "ubuntu:focal": "build-essential",
+    "ubuntu:noble": "build-essential",
     "ubuntu:focal::arch64": "build-essential",
     "ubuntu:focal::arch64": "build-essential",
     "centos:7": "build-essential"
     "centos:7": "build-essential"
   },
   },
@@ -41,6 +46,10 @@
       "bzip2",
       "bzip2",
       "libbz2-dev"
       "libbz2-dev"
     ],
     ],
+    "ubuntu:noble": [
+      "bzip2",
+      "libbz2-dev"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "bzip2",
       "bzip2",
       "libbz2-dev"
       "libbz2-dev"
@@ -57,12 +66,14 @@
   "clang": {
   "clang": {
     "debian:10": "clang",
     "debian:10": "clang",
     "ubuntu:focal": "clang",
     "ubuntu:focal": "clang",
+    "ubuntu:noble": "clang",
     "ubuntu:focal::arch64": "clang",
     "ubuntu:focal::arch64": "clang",
     "centos:7": "clang",
     "centos:7": "clang",
     "centos:8": "clang"
     "centos:8": "clang"
   },
   },
   "cmake": {
   "cmake": {
     "ubuntu:focal": "cmake",
     "ubuntu:focal": "cmake",
+    "ubuntu:noble": "cmake",
     "ubuntu:focal::arch64": "cmake"
     "ubuntu:focal::arch64": "cmake"
   },
   },
   "curl": {
   "curl": {
@@ -74,6 +85,10 @@
       "curl",
       "curl",
       "libcurl4-openssl-dev"
       "libcurl4-openssl-dev"
     ],
     ],
+    "ubuntu:noble": [
+      "curl",
+      "libcurl4-openssl-dev"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "curl",
       "curl",
       "libcurl4-openssl-dev"
       "libcurl4-openssl-dev"
@@ -90,6 +105,7 @@
   "doxygen": {
   "doxygen": {
     "debian:10": "doxygen",
     "debian:10": "doxygen",
     "ubuntu:focal": "doxygen",
     "ubuntu:focal": "doxygen",
+    "ubuntu:noble": "doxygen",
     "ubuntu:focal::arch64": "doxygen",
     "ubuntu:focal::arch64": "doxygen",
     "centos:7": "doxygen"
     "centos:7": "doxygen"
   },
   },
@@ -105,6 +121,10 @@
       "fuse",
       "fuse",
       "libfuse-dev"
       "libfuse-dev"
     ],
     ],
+    "ubuntu:noble": [
+      "fuse",
+      "libfuse-dev"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "fuse",
       "fuse",
       "libfuse-dev"
       "libfuse-dev"
@@ -131,6 +151,10 @@
       "gcc",
       "gcc",
       "g++"
       "g++"
     ],
     ],
+    "ubuntu:noble": [
+      "gcc",
+      "g++"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "gcc",
       "gcc",
       "g++"
       "g++"
@@ -146,27 +170,32 @@
   "git": {
   "git": {
     "debian:10": "git",
     "debian:10": "git",
     "ubuntu:focal": "git",
     "ubuntu:focal": "git",
+    "ubuntu:noble": "git",
     "ubuntu:focal::arch64": "git",
     "ubuntu:focal::arch64": "git",
     "centos:8": "git"
     "centos:8": "git"
   },
   },
   "gnupg-agent": {
   "gnupg-agent": {
     "debian:10": "gnupg-agent",
     "debian:10": "gnupg-agent",
     "ubuntu:focal": "gnupg-agent",
     "ubuntu:focal": "gnupg-agent",
+    "ubuntu:noble": "gnupg-agent",
     "ubuntu:focal::arch64": "gnupg-agent"
     "ubuntu:focal::arch64": "gnupg-agent"
   },
   },
   "hugo": {
   "hugo": {
     "debian:10": "hugo",
     "debian:10": "hugo",
     "ubuntu:focal": "hugo",
     "ubuntu:focal": "hugo",
+    "ubuntu:noble": "hugo",
     "ubuntu:focal::arch64": "hugo"
     "ubuntu:focal::arch64": "hugo"
   },
   },
   "libbcprov-java": {
   "libbcprov-java": {
     "debian:10": "libbcprov-java",
     "debian:10": "libbcprov-java",
     "ubuntu:focal": "libbcprov-java",
     "ubuntu:focal": "libbcprov-java",
+    "ubuntu:noble": "libbcprov-java",
     "ubuntu:focal::arch64": "libbcprov-java"
     "ubuntu:focal::arch64": "libbcprov-java"
   },
   },
   "libtool": {
   "libtool": {
     "debian:10": "libtool",
     "debian:10": "libtool",
     "ubuntu:focal": "libtool",
     "ubuntu:focal": "libtool",
+    "ubuntu:noble": "libtool",
     "ubuntu:focal::arch64": "libtool",
     "ubuntu:focal::arch64": "libtool",
     "centos:7": "libtool",
     "centos:7": "libtool",
     "centos:8": "libtool"
     "centos:8": "libtool"
@@ -174,6 +203,7 @@
   "openssl": {
   "openssl": {
     "debian:10": "libssl-dev",
     "debian:10": "libssl-dev",
     "ubuntu:focal": "libssl-dev",
     "ubuntu:focal": "libssl-dev",
+    "ubuntu:noble": "libssl-dev",
     "ubuntu:focal::arch64": "libssl-dev",
     "ubuntu:focal::arch64": "libssl-dev",
     "centos:7": "openssl-devel",
     "centos:7": "openssl-devel",
     "centos:8": "openssl-devel"
     "centos:8": "openssl-devel"
@@ -193,6 +223,10 @@
       "libprotobuf-dev",
       "libprotobuf-dev",
       "libprotoc-dev"
       "libprotoc-dev"
     ],
     ],
+    "ubuntu:noble": [
+      "libprotobuf-dev",
+      "libprotoc-dev"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "libprotobuf-dev",
       "libprotobuf-dev",
       "libprotoc-dev"
       "libprotoc-dev"
@@ -201,6 +235,7 @@
   "sasl": {
   "sasl": {
     "debian:10": "libsasl2-dev",
     "debian:10": "libsasl2-dev",
     "ubuntu:focal": "libsasl2-dev",
     "ubuntu:focal": "libsasl2-dev",
+    "ubuntu:noble": "libsasl2-dev",
     "ubuntu:focal::arch64": "libsasl2-dev",
     "ubuntu:focal::arch64": "libsasl2-dev",
     "centos:7": "cyrus-sasl-devel",
     "centos:7": "cyrus-sasl-devel",
     "centos:8": "cyrus-sasl-devel"
     "centos:8": "cyrus-sasl-devel"
@@ -208,6 +243,7 @@
   "snappy": {
   "snappy": {
     "debian:10": "libsnappy-dev",
     "debian:10": "libsnappy-dev",
     "ubuntu:focal": "libsnappy-dev",
     "ubuntu:focal": "libsnappy-dev",
+    "ubuntu:noble": "libsnappy-dev",
     "ubuntu:focal::arch64": "libsnappy-dev",
     "ubuntu:focal::arch64": "libsnappy-dev",
     "centos:7": "snappy-devel"
     "centos:7": "snappy-devel"
   },
   },
@@ -220,6 +256,10 @@
       "libzstd-dev",
       "libzstd-dev",
       "zlib1g-dev"
       "zlib1g-dev"
     ],
     ],
+    "ubuntu:noble": [
+      "libzstd-dev",
+      "zlib1g-dev"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "libzstd-dev",
       "libzstd-dev",
       "zlib1g-dev"
       "zlib1g-dev"
@@ -236,11 +276,13 @@
   "locales": {
   "locales": {
     "debian:10": "locales",
     "debian:10": "locales",
     "ubuntu:focal": "locales",
     "ubuntu:focal": "locales",
+    "ubuntu:noble": "locales",
     "ubuntu:focal::arch64": "locales"
     "ubuntu:focal::arch64": "locales"
   },
   },
   "libtirpc-devel": {
   "libtirpc-devel": {
     "centos:7": "libtirpc-devel",
     "centos:7": "libtirpc-devel",
-    "centos:8": "libtirpc-devel"
+    "centos:8": "libtirpc-devel",
+    "ubuntu:noble": "libtirpc-dev"
   },
   },
   "libpmem": {
   "libpmem": {
     "centos:7": "libpmem-devel"
     "centos:7": "libpmem-devel"
@@ -248,6 +290,7 @@
   "make": {
   "make": {
     "debian:10": "make",
     "debian:10": "make",
     "ubuntu:focal": "make",
     "ubuntu:focal": "make",
+    "ubuntu:noble": "make",
     "ubuntu:focal::arch64": "make",
     "ubuntu:focal::arch64": "make",
     "centos:7": "make",
     "centos:7": "make",
     "centos:8": "make"
     "centos:8": "make"
@@ -255,6 +298,7 @@
   "maven": {
   "maven": {
     "debian:10": "maven",
     "debian:10": "maven",
     "ubuntu:focal": "maven",
     "ubuntu:focal": "maven",
+    "ubuntu:noble": "maven",
     "ubuntu:focal::arch64": "maven"
     "ubuntu:focal::arch64": "maven"
   },
   },
   "java": {
   "java": {
@@ -265,6 +309,11 @@
       "openjdk-11-jdk",
       "openjdk-11-jdk",
       "openjdk-17-jdk"
       "openjdk-17-jdk"
     ],
     ],
+    "ubuntu:noble": [
+      "temurin-24-jdk",
+      "openjdk-11-jdk",
+      "openjdk-17-jdk"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "temurin-24-jdk",
       "temurin-24-jdk",
       "openjdk-8-jdk",
       "openjdk-8-jdk",
@@ -275,6 +324,7 @@
   "pinentry-curses": {
   "pinentry-curses": {
     "debian:10": "pinentry-curses",
     "debian:10": "pinentry-curses",
     "ubuntu:focal": "pinentry-curses",
     "ubuntu:focal": "pinentry-curses",
+    "ubuntu:noble": "pinentry-curses",
     "ubuntu:focal::arch64": "pinentry-curses",
     "ubuntu:focal::arch64": "pinentry-curses",
     "centos:7": "pinentry-curses",
     "centos:7": "pinentry-curses",
     "centos:8": "pinentry-curses"
     "centos:8": "pinentry-curses"
@@ -282,6 +332,7 @@
   "pkg-config": {
   "pkg-config": {
     "debian:10": "pkg-config",
     "debian:10": "pkg-config",
     "ubuntu:focal": "pkg-config",
     "ubuntu:focal": "pkg-config",
+    "ubuntu:noble": "pkg-config",
     "ubuntu:focal::arch64": "pkg-config",
     "ubuntu:focal::arch64": "pkg-config",
     "centos:8": "pkg-config"
     "centos:8": "pkg-config"
   },
   },
@@ -300,6 +351,13 @@
       "python3-setuptools",
       "python3-setuptools",
       "python3-wheel"
       "python3-wheel"
     ],
     ],
+    "ubuntu:noble": [
+      "python3",
+      "python3-pip",
+      "python3-pkg-resources",
+      "python3-setuptools",
+      "python3-wheel"
+    ],
     "ubuntu:focal::arch64": [
     "ubuntu:focal::arch64": [
       "python2.7",
       "python2.7",
       "python3",
       "python3",
@@ -324,6 +382,7 @@
   "rsync": {
   "rsync": {
     "debian:10": "rsync",
     "debian:10": "rsync",
     "ubuntu:focal": "rsync",
     "ubuntu:focal": "rsync",
+    "ubuntu:noble": "rsync",
     "ubuntu:focal::arch64": "rsync",
     "ubuntu:focal::arch64": "rsync",
     "centos:7": "rsync",
     "centos:7": "rsync",
     "centos:8": "rsync"
     "centos:8": "rsync"
@@ -331,6 +390,7 @@
   "shellcheck": {
   "shellcheck": {
     "debian:10": "shellcheck",
     "debian:10": "shellcheck",
     "ubuntu:focal": "shellcheck",
     "ubuntu:focal": "shellcheck",
+    "ubuntu:noble": "shellcheck",
     "ubuntu:focal::arch64": "shellcheck"
     "ubuntu:focal::arch64": "shellcheck"
   },
   },
   "shasum": {
   "shasum": {
@@ -340,11 +400,13 @@
   "software-properties-common": {
   "software-properties-common": {
     "debian:10": "software-properties-common",
     "debian:10": "software-properties-common",
     "ubuntu:focal": "software-properties-common",
     "ubuntu:focal": "software-properties-common",
+    "ubuntu:noble": "software-properties-common",
     "ubuntu:focal::arch64": "software-properties-common"
     "ubuntu:focal::arch64": "software-properties-common"
   },
   },
   "sudo": {
   "sudo": {
     "debian:10": "sudo",
     "debian:10": "sudo",
     "ubuntu:focal": "sudo",
     "ubuntu:focal": "sudo",
+    "ubuntu:noble": "sudo",
     "ubuntu:focal::arch64": "sudo",
     "ubuntu:focal::arch64": "sudo",
     "centos:7": "sudo",
     "centos:7": "sudo",
     "centos:8": "sudo"
     "centos:8": "sudo"
@@ -352,6 +414,7 @@
   "valgrind": {
   "valgrind": {
     "debian:10": "valgrind",
     "debian:10": "valgrind",
     "ubuntu:focal": "valgrind",
     "ubuntu:focal": "valgrind",
+    "ubuntu:noble": "valgrind",
     "ubuntu:focal::arch64": "valgrind",
     "ubuntu:focal::arch64": "valgrind",
     "centos:7": "valgrind",
     "centos:7": "valgrind",
     "centos:8": "valgrind"
     "centos:8": "valgrind"
@@ -359,6 +422,7 @@
   "yasm": {
   "yasm": {
     "debian:10": "yasm",
     "debian:10": "yasm",
     "ubuntu:focal": "yasm",
     "ubuntu:focal": "yasm",
+    "ubuntu:noble": "yasm",
     "ubuntu:focal::arch64": "yasm"
     "ubuntu:focal::arch64": "yasm"
   }
   }
 }
 }

+ 1 - 0
dev-support/docker/pkg-resolver/platforms.json

@@ -1,6 +1,7 @@
 [
 [
   "ubuntu:focal",
   "ubuntu:focal",
   "ubuntu:focal::arch64",
   "ubuntu:focal::arch64",
+  "ubuntu:noble",
   "centos:7",
   "centos:7",
   "centos:8",
   "centos:8",
   "debian:10"
   "debian:10"

+ 10 - 0
hadoop-project/pom.xml

@@ -2747,6 +2747,16 @@
         </dependencies>
         </dependencies>
       </dependencyManagement>
       </dependencyManagement>
     </profile>
     </profile>
+    <profile>
+      <id>jdk17+</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
+      <properties>
+        <javac.version>17</javac.version>
+        <maven.compiler.release>${javac.version}</maven.compiler.release>
+      </properties>
+    </profile>
   </profiles>
   </profiles>
 
 
   <repositories>
   <repositories>

+ 22 - 4
start-build-env.sh

@@ -19,12 +19,29 @@ set -e               # exit on error
 
 
 cd "$(dirname "$0")" # connect to root
 cd "$(dirname "$0")" # connect to root
 
 
+OS_PLATFORM="${1:-}"
+[ "$#" -gt 0 ] && shift
+
+DEFAULT_OS_PLATFORM="ubuntu_20"
+
+OS_PLATFORM_SUFFIX=""
+
+if [[ -n ${OS_PLATFORM} ]] && [[ "${OS_PLATFORM}" != "${DEFAULT_OS_PLATFORM}" ]]; then
+  # ubuntu_20 (default) platform does not have suffix in Dockerfile.
+  OS_PLATFORM_SUFFIX="_${OS_PLATFORM}"
+fi
+
 DOCKER_DIR=dev-support/docker
 DOCKER_DIR=dev-support/docker
-DOCKER_FILE="${DOCKER_DIR}/Dockerfile"
+DOCKER_FILE="${DOCKER_DIR}/Dockerfile${OS_PLATFORM_SUFFIX}"
 
 
 CPU_ARCH=$(echo "$MACHTYPE" | cut -d- -f1)
 CPU_ARCH=$(echo "$MACHTYPE" | cut -d- -f1)
 if [[ "$CPU_ARCH" == "aarch64" || "$CPU_ARCH" == "arm64" ]]; then
 if [[ "$CPU_ARCH" == "aarch64" || "$CPU_ARCH" == "arm64" ]]; then
-  DOCKER_FILE="${DOCKER_DIR}/Dockerfile_aarch64"
+  DOCKER_FILE="${DOCKER_DIR}/Dockerfile${OS_PLATFORM_SUFFIX}_aarch64"
+fi
+
+if [ ! -e "${DOCKER_FILE}" ] ; then
+  echo "'${OS_PLATFORM}' environment not available yet for '${CPU_ARCH}'"
+  exit 1
 fi
 fi
 
 
 docker build -t hadoop-build -f $DOCKER_FILE $DOCKER_DIR
 docker build -t hadoop-build -f $DOCKER_FILE $DOCKER_DIR
@@ -69,7 +86,7 @@ fi
 # Set the home directory in the Docker container.
 # Set the home directory in the Docker container.
 DOCKER_HOME_DIR=${DOCKER_HOME_DIR:-/home/${USER_NAME}}
 DOCKER_HOME_DIR=${DOCKER_HOME_DIR:-/home/${USER_NAME}}
 
 
-docker build -t "hadoop-build-${USER_ID}" - <<UserSpecificDocker
+docker build -t "hadoop-build${OS_PLATFORM_SUFFIX}-${USER_ID}" - <<UserSpecificDocker
 FROM hadoop-build
 FROM hadoop-build
 RUN rm -f /var/log/faillog /var/log/lastlog
 RUN rm -f /var/log/faillog /var/log/lastlog
 RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME}
 RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME}
@@ -93,4 +110,5 @@ docker run --rm=true $DOCKER_INTERACTIVE_RUN \
   -v "${HOME}/.m2:${DOCKER_HOME_DIR}/.m2${V_OPTS:-}" \
   -v "${HOME}/.m2:${DOCKER_HOME_DIR}/.m2${V_OPTS:-}" \
   -v "${HOME}/.gnupg:${DOCKER_HOME_DIR}/.gnupg${V_OPTS:-}" \
   -v "${HOME}/.gnupg:${DOCKER_HOME_DIR}/.gnupg${V_OPTS:-}" \
   -u "${USER_ID}" \
   -u "${USER_ID}" \
-  "hadoop-build-${USER_ID}" "$@"
+  --name "hadoop-build${OS_PLATFORM_SUFFIX}" \
+  "hadoop-build${OS_PLATFORM_SUFFIX}-${USER_ID}" "$@"