HADOOP-16054. Update Dockerfile to use Bionic (#3833)

(cherry picked from commit 81d8b71534645a2109a037115fb955351edfbf64)

 Conflicts:
	dev-support/docker/Dockerfile
This commit is contained in:
Akira Ajisaka 2021-12-28 15:25:01 +09:00 committed by GitHub
parent 205dddbfc6
commit 87726b3dcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@
# Dockerfile for installing the necessary dependencies for building Hadoop. # Dockerfile for installing the necessary dependencies for building Hadoop.
# See BUILDING.txt. # See BUILDING.txt.
FROM ubuntu:xenial FROM ubuntu:bionic
WORKDIR /root WORKDIR /root
@ -44,8 +44,11 @@ ENV DEBCONF_TERSE true
RUN apt-get -q update \ RUN apt-get -q update \
&& apt-get -q install -y --no-install-recommends \ && apt-get -q install -y --no-install-recommends \
apt-utils \ apt-utils \
bats \
build-essential \ build-essential \
bzip2 \ bzip2 \
clang \
cmake \
curl \ curl \
doxygen \ doxygen \
fuse \ fuse \
@ -61,6 +64,7 @@ RUN apt-get -q update \
libsasl2-dev \ libsasl2-dev \
libsnappy-dev \ libsnappy-dev \
libssl-dev \ libssl-dev \
libsnappy-dev \
libtool \ libtool \
libzstd1-dev \ libzstd1-dev \
locales \ locales \
@ -74,8 +78,8 @@ RUN apt-get -q update \
python-setuptools \ python-setuptools \
python-wheel \ python-wheel \
rsync \ rsync \
shellcheck \
software-properties-common \ software-properties-common \
snappy \
sudo \ sudo \
zlib1g-dev \ zlib1g-dev \
&& apt-get clean \ && apt-get clean \
@ -101,18 +105,7 @@ RUN curl -L -s -S https://cdn.azul.com/zulu/bin/zulu7.38.0.11-ca-jdk7.0.262-linu
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
###### ######
# Install cmake 3.1.0 (3.5.1 ships with Xenial) # Install Google Protobuf 2.5.0 (3.0.0 ships with Bionic)
######
RUN mkdir -p /opt/cmake \
&& curl -L -s -S \
https://cmake.org/files/v3.1/cmake-3.1.0-Linux-x86_64.tar.gz \
-o /opt/cmake.tar.gz \
&& tar xzf /opt/cmake.tar.gz --strip-components 1 -C /opt/cmake
ENV CMAKE_HOME /opt/cmake
ENV PATH "${PATH}:/opt/cmake/bin"
######
# Install Google Protobuf 2.5.0 (2.6.0 ships with Xenial)
###### ######
# hadolint ignore=DL3003 # hadolint ignore=DL3003
RUN mkdir -p /opt/protobuf-src \ RUN mkdir -p /opt/protobuf-src \
@ -129,7 +122,7 @@ ENV PROTOBUF_HOME /opt/protobuf
ENV PATH "${PATH}:/opt/protobuf/bin" ENV PATH "${PATH}:/opt/protobuf/bin"
###### ######
# Install Apache Maven 3.3.9 (3.3.9 ships with Xenial) # Install Apache Maven 3.6.0 (3.6.0 ships with Bionic)
###### ######
# hadolint ignore=DL3008 # hadolint ignore=DL3008
RUN apt-get -q update \ RUN apt-get -q update \
@ -137,15 +130,8 @@ RUN apt-get -q update \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ENV MAVEN_HOME /usr ENV MAVEN_HOME /usr
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
###### ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
# Install Apache Ant 1.9.6 (1.9.6 ships with Xenial)
######
# hadolint ignore=DL3008
RUN apt-get -q update \
&& apt-get -q install -y --no-install-recommends ant \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
####### #######
# Install SpotBugs 4.2.2 # Install SpotBugs 4.2.2
@ -157,25 +143,6 @@ RUN mkdir -p /opt/spotbugs \
&& chmod +x /opt/spotbugs/bin/* && chmod +x /opt/spotbugs/bin/*
ENV SPOTBUGS_HOME /opt/spotbugs ENV SPOTBUGS_HOME /opt/spotbugs
####
# Install shellcheck (0.4.6, the latest as of 2017-09-26)
####
# hadolint ignore=DL3008
RUN add-apt-repository -y ppa:hvr/ghc \
&& apt-get -q update \
&& apt-get -q install -y --no-install-recommends shellcheck ghc-8.0.2 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
####
# Install bats (0.4.0, the latest as of 2017-09-26, ships with Xenial)
####
# hadolint ignore=DL3008
RUN apt-get -q update \
&& apt-get -q install -y --no-install-recommends bats \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
#### ####
# Install pylint at fixed version (2.0.0 removed python2 support) # Install pylint at fixed version (2.0.0 removed python2 support)
# https://github.com/PyCQA/pylint/issues/2294 # https://github.com/PyCQA/pylint/issues/2294