Skip to content
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

TEZ-4496: Tez precommit fails while building yetus image - no alternatives for some executables #289

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build-tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y openjdk-8
RUN apt-get -q update && apt-get -q install --no-install-recommends -y default-jre-headless openjdk-11-jdk-headless \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& update-java-alternatives -s java-1.8.0-openjdk-amd64 \
&& rm -f /usr/lib/jvm/default-java \
&& update-java-alternatives -s java-1.8.0-openjdk-amd64 || :
# since update alternatives might fail on executables that we don't really need (e.g. appletviewer)
# and return with exit code <0 (actually: 2), we can simply do a sanity check if the version is
# as expected for "java" executable after the update and go on
RUN java -version 2>&1 | grep "1.8.0" && rm -f /usr/lib/jvm/default-java \
&& ln -s java-8-openjdk-amd64 /usr/lib/jvm/default-java
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

Expand Down