-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-19709. [JDK17] Add debian:12 and debian:13 as a build platform with JDK-17 as default #8001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vinayakumarb
wants to merge
1
commit into
apache:trunk
Choose a base branch
from
vinayakumarb:features/HADOOP-19709
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+353
−3
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# 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 debian:12 | ||
|
||
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 | ||
RUN apt-get -q install -y --no-install-recommends wget apt-transport-https gpg gpg-agent gawk ca-certificates | ||
RUN apt-get -q install -y --no-install-recommends python3 | ||
RUN 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 | ||
RUN wget -q -O - https://packages.adoptium.net/artifactory/api/gpg/key/public > /etc/apt/trusted.gpg.d/adoptium.asc | ||
RUN apt-get -q update | ||
RUN apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py debian:12) | ||
RUN apt-get clean | ||
RUN update-java-alternatives -s temurin-17-jdk-amd64 | ||
RUN rm -rf /var/lib/apt/lists/* | ||
|
||
# Enable the locale | ||
RUN sed -i 's/^# en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/g' /etc/locale.gen | ||
RUN locale-gen | ||
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=/opt/maven | ||
ENV PATH="${PATH}:${MAVEN_HOME}/bin" | ||
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003) | ||
ENV JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-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-maven.sh debian:12 | ||
RUN pkg-resolver/install-cmake.sh debian:12 | ||
RUN pkg-resolver/install-spotbugs.sh debian:12 | ||
RUN pkg-resolver/install-boost.sh debian:12 | ||
RUN pkg-resolver/install-protobuf.sh debian:12 | ||
RUN pkg-resolver/install-hadolint.sh debian:12 | ||
RUN pkg-resolver/install-intel-isa-l.sh debian:12 | ||
|
||
### | ||
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# 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 debian:13 | ||
|
||
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 | ||
RUN apt-get -q install -y --no-install-recommends wget apt-transport-https gpg gpg-agent gawk ca-certificates | ||
RUN apt-get -q install -y --no-install-recommends python3 | ||
RUN 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 | ||
RUN wget -q -O - https://packages.adoptium.net/artifactory/api/gpg/key/public > /etc/apt/trusted.gpg.d/adoptium.asc | ||
RUN apt-get -q update | ||
RUN apt-get -q install -y --no-install-recommends $(pkg-resolver/resolve.py debian:13) | ||
RUN apt-get clean | ||
RUN update-java-alternatives -s temurin-17-jdk-amd64 | ||
RUN rm -rf /var/lib/apt/lists/* | ||
|
||
RUN sed -i 's/^# en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/g' /etc/locale.gen | ||
RUN locale-gen | ||
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=/opt/maven | ||
ENV PATH="${PATH}:${MAVEN_HOME}/bin" | ||
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003) | ||
ENV JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-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-maven.sh debian:13 | ||
RUN pkg-resolver/install-cmake.sh debian:13 | ||
RUN pkg-resolver/install-spotbugs.sh debian:13 | ||
RUN pkg-resolver/install-boost.sh debian:13 | ||
RUN pkg-resolver/install-protobuf.sh debian:13 | ||
RUN pkg-resolver/install-hadolint.sh debian:13 | ||
RUN pkg-resolver/install-intel-isa-l.sh debian:13 | ||
|
||
### | ||
# 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each RUN produces one image layer, you should concat those shell commands by && instead