You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by rs...@apache.org on 2021/04/01 11:18:58 UTC

[avro] branch master updated: AVRO-3092: Update ubertool image to buster (#1155)

This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 5b6e75c  AVRO-3092: Update ubertool image to buster (#1155)
5b6e75c is described below

commit 5b6e75cd29d7e78fd0422bc71b1dfad0bebe47d3
Author: RyanSkraba <ry...@skraba.com>
AuthorDate: Thu Apr 1 13:18:45 2021 +0200

    AVRO-3092: Update ubertool image to buster (#1155)
    
    This requires installing the JDK8 from another repository.  In this case
    AdoptOpenJDK.
---
 share/docker/Dockerfile | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/share/docker/Dockerfile b/share/docker/Dockerfile
index 09d4e64..87fedd4 100644
--- a/share/docker/Dockerfile
+++ b/share/docker/Dockerfile
@@ -18,7 +18,7 @@
 # See BUILD.txt.
 
 # Despite this base, JDK8 is used by default.  See below.
-FROM openjdk:11-stretch
+FROM openjdk:11-buster
 WORKDIR /root
 
 ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=isolemnlysweariamuptonogood \
@@ -50,7 +50,6 @@ RUN apt-get -qqy update \
                                                  libsnappy1v5 \
                                                  make \
                                                  mypy \
-                                                 openjdk-8-jdk \
                                                  perl \
                                                  python3 \
                                                  python3-pip \
@@ -67,6 +66,13 @@ RUN apt-get -qqy update \
  && apt-get -qqy clean \
  && rm -rf /var/lib/apt/lists
 
+RUN wget -qO- https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - \
+ && echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster main" | tee /etc/apt/sources.list.d/adoptopenjdk.list \
+ && apt-get -qqy update \
+ && apt-get -qqy install --no-install-recommends adoptopenjdk-8-hotspot \
+ && apt-get -qqy clean \
+ && rm -rf /var/lib/apt/lists
+
 # Install a maven release  -------------------------------------------
 # Inspired from https://github.com/apache/accumulo-docker/blob/master/Dockerfile#L53
 
@@ -187,16 +193,16 @@ COPY lang/ruby/Gemfile /tmp
 RUN bundle install --gemfile=/tmp/Gemfile
 
 # Note: This "ubertool" container has two JDK versions:
-# - OpenJDK 8 (installed as a package and available at /usr/bin/java)
+# - OpenJDK 8 (installed as an AdoptOpenJDK package)
 # - OpenJDK 11 (installed from the base image, and prioritized in the PATH)
 # - The root build.sh script switches between the versions according to
 #   the JAVA environment variable.
 
-# Since want the JDK8 as a default, we have to re-prepend it to the PATH.
+# Since we want the JDK8 as a default, we have to re-prepend it to the PATH.
 # The /usr/local/openjdk-8 link is created to be consistent with the
 # openjdk:8 image.
 
-RUN ln -s /usr/lib/jvm/java-8-openjdk-amd64 /usr/local/openjdk-8
+RUN ln -s /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64 /usr/local/openjdk-8
 ENV JAVA_HOME /usr/local/openjdk-8
 ENV PATH $JAVA_HOME/bin:$PATH