# 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 centos:8 WORKDIR /root SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN yum update -y \ && yum install -y \ ant \ bzip2 \ bzip2-devel \ clang \ curl \ cyrus-sasl-devel \ dnf \ fuse \ git \ libcurl-devel \ fuse \ fuse-libs \ fuse-devel \ libtool \ libtirpc-devel \ lz4-devel \ make \ openssl-devel \ pinentry-curses \ pkg-config \ python3 \ python3-pip \ python3-setuptools \ python3-wheel \ rsync \ sudo \ valgrind \ zlib-devel #### # Install EPEL #### RUN mkdir -p /tmp/epel \ && curl -L -s -S https://download-ib01.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ -o /tmp/epel/epel-release-latest-8.noarch.rpm \ && rpm -Uvh /tmp/epel/epel-release-latest-8.noarch.rpm RUN dnf --enablerepo=powertools install -y \ doxygen \ snappy-devel RUN dnf install -y \ bouncycastle \ gcc-toolset-9-gcc \ gcc-toolset-9-gcc-c++ \ nodejs \ npm \ libpmem-devel # Set GCC 9 as the default C/C++ compiler RUN echo "source /opt/rh/gcc-toolset-9/enable" >> /etc/bashrc SHELL ["/bin/bash", "--login", "-c"] #### # Install Maven 3.6.3 #### RUN mkdir -p /opt/maven /tmp/maven \ && curl -L -s -S https://mirrors.estointernet.in/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ -o /tmp/maven/apache-maven-3.6.3-bin.tar.gz \ && tar xzf /tmp/maven/apache-maven-3.6.3-bin.tar.gz --strip-components 1 -C /opt/maven #### # Install CMake 3.19 #### # hadolint ignore=DL3003 RUN mkdir -p /tmp/cmake /opt/cmake \ && curl -L -s -S https://cmake.org/files/v3.19/cmake-3.19.0.tar.gz -o /tmp/cmake/cmake-3.19.0.tar.gz \ && tar xzf /tmp/cmake/cmake-3.19.0.tar.gz --strip-components 1 -C /opt/cmake \ && cd /opt/cmake || exit && ./bootstrap \ && make "-j$(nproc)" \ && make install \ && cd /root || exit #### # Install zstandard #### # hadolint ignore=DL3003 RUN mkdir -p /opt/zstd /tmp/zstd \ && curl -L -s -S https://github.com/facebook/zstd/archive/refs/tags/v1.4.9.tar.gz -o /tmp/zstd/v1.4.9.tar.gz \ && tar xzf /tmp/zstd/v1.4.9.tar.gz --strip-components 1 -C /opt/zstd \ && cd /opt/zstd || exit \ && make "-j$(nproc)" \ && make install \ && cd /root || exit ###### # Set env vars required to build Hadoop ###### ENV MAVEN_HOME /opt/maven/apache-maven-3.6.3 ENV PATH "${PATH}:${MAVEN_HOME}/bin" # JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003) ENV JAVA_HOME /usr/lib/jvm/java-1.8.0 ####### # Install SpotBugs 4.2.2 ####### RUN mkdir -p /opt/spotbugs \ && curl -L -s -S https://github.com/spotbugs/spotbugs/releases/download/4.2.2/spotbugs-4.2.2.tgz \ -o /opt/spotbugs.tgz \ && tar xzf /opt/spotbugs.tgz --strip-components 1 -C /opt/spotbugs \ && chmod +x /opt/spotbugs/bin/* ENV SPOTBUGS_HOME /opt/spotbugs ####### # Install Boost 1.72 ####### # hadolint ignore=DL3003 RUN mkdir -p /opt/boost-library \ && curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download > boost_1_72_0.tar.bz2 \ && mv boost_1_72_0.tar.bz2 /opt/boost-library \ && cd /opt/boost-library \ && tar --bzip2 -xf boost_1_72_0.tar.bz2 \ && cd /opt/boost-library/boost_1_72_0 \ && ./bootstrap.sh --prefix=/usr/ \ && ./b2 --without-python install \ && cd /root \ && rm -rf /opt/boost-library ###### # Install Google Protobuf 3.7.1 ###### # hadolint ignore=DL3003 RUN mkdir -p /opt/protobuf-src \ && curl -L -s -S \ https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz \ -o /opt/protobuf.tar.gz \ && tar xzf /opt/protobuf.tar.gz --strip-components 1 -C /opt/protobuf-src \ && cd /opt/protobuf-src \ && ./configure --prefix=/opt/protobuf \ && make "-j$(nproc)" \ && make install \ && cd /root \ && rm -rf /opt/protobuf-src ENV PROTOBUF_HOME /opt/protobuf ENV PATH "${PATH}:/opt/protobuf/bin" #### # Install pylint and python-dateutil #### RUN pip3 install pylint==2.6.0 python-dateutil==2.8.1 #### # Install bower #### # hadolint ignore=DL3008 RUN npm install -g bower@1.8.8