Skip to content

Commit f40defe

Browse files
committed
HADOOP-19659. Upgrade Debian 10 to 11 in build env Dockerfile
1 parent 9d2a83d commit f40defe

File tree

7 files changed

+68
-67
lines changed

7 files changed

+68
-67
lines changed

BUILDING.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ On Linux / Mac:
3131

3232
$ ./start-build-env.sh [OS platform]
3333

34-
- [OS Platform] One of [centos_7, centos_8, debian_10, ubuntu_20, ubuntu_24, windows_10].
34+
- [OS Platform] One of [centos_8, debian_11, ubuntu_20, ubuntu_24, windows_10].
3535
Default is 'ubuntu_20'.
3636
Note: Currently only default ('ubuntu_20') is supported on arm machine
3737

dev-support/Jenkinsfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ pipeline {
9191
'''
9292
}
9393

94-
dir("${WORKSPACE}/debian-10") {
94+
dir("${WORKSPACE}/debian-11") {
9595
sh '''#!/usr/bin/env bash
9696
97-
cp -Rp ${WORKSPACE}/src ${WORKSPACE}/debian-10
97+
cp -Rp ${WORKSPACE}/src ${WORKSPACE}/debian-11
9898
'''
9999
}
100100

@@ -157,12 +157,12 @@ pipeline {
157157
// C++/C++ build/platform.
158158
// This stage serves as a means of cross platform validation, which is
159159
// really needed to ensure that any C++ related/platform change doesn't
160-
// break the Hadoop build on Debian 10.
161-
stage ('precommit-run Debian 10') {
160+
// break the Hadoop build on Debian 11.
161+
stage ('precommit-run Debian 11') {
162162
environment {
163-
SOURCEDIR = "${WORKSPACE}/debian-10/src"
164-
PATCHDIR = "${WORKSPACE}/debian-10/out"
165-
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile_debian_10"
163+
SOURCEDIR = "${WORKSPACE}/debian-11/src"
164+
PATCHDIR = "${WORKSPACE}/debian-11/out"
165+
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile_debian_11"
166166
IS_OPTIONAL = 1
167167
}
168168

@@ -182,7 +182,7 @@ pipeline {
182182
failure {
183183
sh '''#!/usr/bin/env bash
184184
185-
cp -Rp "${WORKSPACE}/debian-10/out" "${WORKSPACE}"
185+
cp -Rp "${WORKSPACE}/debian-11/out" "${WORKSPACE}"
186186
'''
187187
archiveArtifacts "out/**"
188188
}

dev-support/docker/Dockerfile_debian_10 renamed to dev-support/docker/Dockerfile_debian_11

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Dockerfile for installing the necessary dependencies for building Hadoop.
1818
# See BUILDING.txt.
1919

20-
FROM debian:10
20+
FROM debian:11
2121

2222
WORKDIR /root
2323

@@ -29,65 +29,63 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
2929
RUN echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras
3030
RUN echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras
3131

32-
ENV DEBIAN_FRONTEND noninteractive
33-
ENV DEBCONF_TERSE true
32+
ENV DEBIAN_FRONTEND=noninteractive
33+
ENV DEBCONF_TERSE=true
3434

3535
######
3636
# Platform package dependency resolver
3737
######
3838
COPY pkg-resolver pkg-resolver
3939
RUN chmod a+x pkg-resolver/install-pkg-resolver.sh
40-
RUN pkg-resolver/install-pkg-resolver.sh debian:10
40+
RUN pkg-resolver/install-pkg-resolver.sh debian:11
4141

4242
######
4343
# Install packages from apt
4444
######
4545
# hadolint ignore=DL3008,SC2046
4646
RUN apt-get -q update \
47-
&& apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py debian:10) \
48-
&& echo 'deb http://deb.debian.org/debian bullseye main' >> /etc/apt/sources.list \
49-
&& apt-get -q update \
50-
&& apt-get -q install -y --no-install-recommends -t bullseye $(pkg-resolver/resolve.py --release=bullseye debian:10) \
47+
&& apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py debian:11) \
5148
&& apt-get clean \
49+
&& update-java-alternatives -s java-1.11.0-openjdk-amd64 \
5250
&& rm -rf /var/lib/apt/lists/*
5351

5452
# TODO : Set locale
5553

5654
######
5755
# Set env vars required to build Hadoop
5856
######
59-
ENV MAVEN_HOME /usr
57+
ENV MAVEN_HOME=/usr
6058
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
61-
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
59+
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
6260

6361
#######
6462
# Set env vars for SpotBugs 4.2.2
6563
#######
66-
ENV SPOTBUGS_HOME /opt/spotbugs
64+
ENV SPOTBUGS_HOME=/opt/spotbugs
6765

6866
#######
6967
# Set env vars for Google Protobuf 3.21.12
7068
#######
71-
ENV PROTOBUF_HOME /opt/protobuf
72-
ENV PATH "${PATH}:/opt/protobuf/bin"
69+
ENV PROTOBUF_HOME=/opt/protobuf
70+
ENV PATH="${PATH}:/opt/protobuf/bin"
7371

7472
###
7573
# Avoid out of memory errors in builds
7674
###
77-
ENV MAVEN_OPTS -Xms256m -Xmx3072m
75+
ENV MAVEN_OPTS="-Xms256m -Xmx3072m"
7876

7977
# Skip gpg verification when downloading Yetus via yetus-wrapper
80-
ENV HADOOP_SKIP_YETUS_VERIFICATION true
78+
ENV HADOOP_SKIP_YETUS_VERIFICATION=true
8179

8280
####
8381
# Install packages
8482
####
85-
RUN pkg-resolver/install-cmake.sh debian:10
86-
RUN pkg-resolver/install-spotbugs.sh debian:10
87-
RUN pkg-resolver/install-boost.sh debian:10
88-
RUN pkg-resolver/install-protobuf.sh debian:10
89-
RUN pkg-resolver/install-hadolint.sh debian:10
90-
RUN pkg-resolver/install-intel-isa-l.sh debian:10
83+
RUN pkg-resolver/install-cmake.sh debian:11
84+
RUN pkg-resolver/install-spotbugs.sh debian:11
85+
RUN pkg-resolver/install-boost.sh debian:11
86+
RUN pkg-resolver/install-protobuf.sh debian:11
87+
RUN pkg-resolver/install-hadolint.sh debian:11
88+
RUN pkg-resolver/install-intel-isa-l.sh debian:11
9189

9290
###
9391
# Everything past this point is either not needed for testing or breaks Yetus.

dev-support/docker/pkg-resolver/install-pkg-resolver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fi
2424
chmod a+x pkg-resolver/*.sh pkg-resolver/*.py
2525
chmod a+r pkg-resolver/*.json
2626

27-
if [ "$1" == "debian:10" ]; then
27+
if [ "$1" == "debian:11" ]; then
2828
apt-get -q update
2929
apt-get -q install -y --no-install-recommends python3 \
3030
python3-pip \

0 commit comments

Comments
 (0)