You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2023/06/30 21:21:10 UTC

[pinot] branch master updated: Update dockerfile with recent jdk distro changes (#10963)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new bde2d01153 Update dockerfile with recent jdk distro changes (#10963)
bde2d01153 is described below

commit bde2d01153fc996dc46d9a61c6a9dccebdb997d5
Author: Xiang Fu <xi...@gmail.com>
AuthorDate: Fri Jun 30 14:21:04 2023 -0700

    Update dockerfile with recent jdk distro changes (#10963)
---
 .../pinot-base-build/amazoncorretto.dockerfile     | 32 ++++++++++----------
 .../pinot-base-build/ms-openjdk.dockerfile         | 20 ++++++-------
 .../pinot-base/pinot-base-build/openjdk.dockerfile | 34 ++++++++++++----------
 .../pinot-base-runtime/amazoncorretto.dockerfile   | 14 ++++-----
 .../pinot-base-runtime/ms-openjdk.dockerfile       | 12 ++++----
 .../pinot-base-runtime/openjdk.dockerfile          | 14 ++++-----
 docker/images/pinot/Dockerfile                     | 14 +++++----
 7 files changed, 73 insertions(+), 67 deletions(-)

diff --git a/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile b/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
index 1f5d80f5b2..674f87d6cb 100644
--- a/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
+++ b/docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
@@ -31,22 +31,22 @@ ARG version=11.0.18.10-1
 LABEL MAINTAINER=dev@pinot.apache.org
 
 RUN set -eux \
-    && apt-get update \
-    && apt-get install -y --no-install-recommends \
-        curl ca-certificates gnupg software-properties-common fontconfig java-common vim wget git automake bison flex g++ libboost-all-dev libevent-dev libssl-dev libtool make pkg-config\
-    && curl -fL https://apt.corretto.aws/corretto.key | apt-key add - \
-    && add-apt-repository 'deb https://apt.corretto.aws stable main' \
-    && mkdir -p /usr/share/man/man1 || true \
-    && apt-get update \
-    && apt-get install -y java-11-amazon-corretto-jdk=1:$version \
-    && rm -rf /var/lib/apt/lists/*
+  && apt-get update \
+  && apt-get install -y --no-install-recommends \
+  curl ca-certificates gnupg software-properties-common fontconfig java-common vim wget git automake bison flex g++ libboost-all-dev libevent-dev libssl-dev libtool make pkg-config\
+  && curl -fL https://apt.corretto.aws/corretto.key | apt-key add - \
+  && add-apt-repository 'deb https://apt.corretto.aws stable main' \
+  && mkdir -p /usr/share/man/man1 || true \
+  && apt-get update \
+  && apt-get install -y java-11-amazon-corretto-jdk=1:$version \
+  && rm -rf /var/lib/apt/lists/*
 
 ENV LANG C.UTF-8
 ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto
 
 # install maven
 RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
-  && wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp \
+  && wget https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz -P /tmp \
   && tar -xzf /tmp/apache-maven-*.tar.gz -C /usr/share/maven --strip-components=1 \
   && rm -f /tmp/apache-maven-*.tar.gz \
   && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
@@ -55,10 +55,10 @@ ENV MAVEN_CONFIG /opt/.m2
 
 # install thrift
 RUN  wget http://archive.apache.org/dist/thrift/0.12.0/thrift-0.12.0.tar.gz -O /tmp/thrift-0.12.0.tar.gz && \
-     tar xfz /tmp/thrift-0.12.0.tar.gz --directory /tmp && \
-     base_dir=`pwd` && \
-     cd /tmp/thrift-0.12.0 && \
-     ./configure --with-cpp=no --with-c_glib=no --with-java=yes --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-php=no && \
-     make install
+  tar xfz /tmp/thrift-0.12.0.tar.gz --directory /tmp && \
+  base_dir=`pwd` && \
+  cd /tmp/thrift-0.12.0 && \
+  ./configure --with-cpp=no --with-c_glib=no --with-java=yes --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-php=no && \
+  make install
 
-CMD ["-help"]
+CMD ["bash"]
diff --git a/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile b/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
index 5f2a1086b3..7fb80886c7 100644
--- a/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
+++ b/docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
@@ -24,13 +24,13 @@ LABEL MAINTAINER=dev@pinot.apache.org
 
 # extra dependency for running launcher
 RUN apt-get update && \
-    apt-get install -y --no-install-recommends vim wget curl git automake bison flex g++ libboost-all-dev libevent-dev \
-    libssl-dev libtool make pkg-config && \
-    rm -rf /var/lib/apt/lists/*
+  apt-get install -y --no-install-recommends vim wget curl git automake bison flex g++ libboost-all-dev libevent-dev \
+  libssl-dev libtool make pkg-config && \
+  rm -rf /var/lib/apt/lists/*
 
 # install maven
 RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
-  && wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp \
+  && wget https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz -P /tmp \
   && tar -xzf /tmp/apache-maven-*.tar.gz -C /usr/share/maven --strip-components=1 \
   && rm -f /tmp/apache-maven-*.tar.gz \
   && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
@@ -39,10 +39,10 @@ ENV MAVEN_CONFIG /opt/.m2
 
 # install thrift
 RUN  wget http://archive.apache.org/dist/thrift/0.12.0/thrift-0.12.0.tar.gz -O /tmp/thrift-0.12.0.tar.gz && \
-     tar xfz /tmp/thrift-0.12.0.tar.gz --directory /tmp && \
-     base_dir=`pwd` && \
-     cd /tmp/thrift-0.12.0 && \
-     ./configure --with-cpp=no --with-c_glib=no --with-java=yes --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-php=no && \
-     make install
+  tar xfz /tmp/thrift-0.12.0.tar.gz --directory /tmp && \
+  base_dir=`pwd` && \
+  cd /tmp/thrift-0.12.0 && \
+  ./configure --with-cpp=no --with-c_glib=no --with-java=yes --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-php=no && \
+  make install
 
-CMD ["-help"]
+CMD ["bash"]
diff --git a/docker/images/pinot-base/pinot-base-build/openjdk.dockerfile b/docker/images/pinot-base/pinot-base-build/openjdk.dockerfile
index 9add85d193..0abef1191f 100644
--- a/docker/images/pinot-base/pinot-base-build/openjdk.dockerfile
+++ b/docker/images/pinot-base/pinot-base-build/openjdk.dockerfile
@@ -16,33 +16,37 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-ARG JAVA_VERSION=11
+ARG JAVA_VERSION=21
 ARG JDK_IMAGE=openjdk
-FROM ${JDK_IMAGE}:${JAVA_VERSION} AS pinot_build_env
+# At 2023-06-14, slim is the only openjdk flavour without medium, high or critical vulns
+FROM ${JDK_IMAGE}:${JAVA_VERSION}-jdk-slim
 
 LABEL MAINTAINER=dev@pinot.apache.org
 
+ENV MAVEN_HOME /usr/share/maven
+ENV MAVEN_CONFIG /root/.m2
+
 # extra dependency for running launcher
 RUN apt-get update && \
-    apt-get install -y --no-install-recommends vim wget curl git automake bison flex g++ libboost-all-dev libevent-dev \
-    libssl-dev libtool make pkg-config && \
-    rm -rf /var/lib/apt/lists/*
+  apt-get install -y --no-install-recommends vim wget curl git automake bison flex g++ libboost-all-dev libevent-dev \
+  libssl-dev libtool make pkg-config && \
+  rm -rf /var/lib/apt/lists/*
 
 # install maven
 RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
-  && wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp \
+  && wget https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz -P /tmp \
   && tar -xzf /tmp/apache-maven-*.tar.gz -C /usr/share/maven --strip-components=1 \
   && rm -f /tmp/apache-maven-*.tar.gz \
-  && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
-ENV MAVEN_HOME /usr/share/maven
-ENV MAVEN_CONFIG /opt/.m2
+  && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn \
+  && mvn help:evaluate -Dexpression=settings.localRepository
+
 
 # install thrift
 RUN  wget http://archive.apache.org/dist/thrift/0.12.0/thrift-0.12.0.tar.gz -O /tmp/thrift-0.12.0.tar.gz && \
-     tar xfz /tmp/thrift-0.12.0.tar.gz --directory /tmp && \
-     base_dir=`pwd` && \
-     cd /tmp/thrift-0.12.0 && \
-     ./configure --with-cpp=no --with-c_glib=no --with-java=yes --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-php=no && \
-     make install
+  tar xfz /tmp/thrift-0.12.0.tar.gz --directory /tmp && \
+  base_dir=`pwd` && \
+  cd /tmp/thrift-0.12.0 && \
+  ./configure --with-cpp=no --with-c_glib=no --with-java=yes --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-php=no && \
+  make install
 
-CMD ["-help"]
+CMD ["bash"]
diff --git a/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile b/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
index 66978ea181..bb43e2131c 100644
--- a/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
+++ b/docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
@@ -24,17 +24,17 @@ FROM ${JDK_IMAGE}:${JAVA_VERSION}-al2-jdk
 LABEL MAINTAINER=dev@pinot.apache.org
 
 RUN yum update -y && \
-    yum groupinstall 'Development Tools' -y && \
-    yum install -y procps vim less wget curl git python sysstat perf libtasn1 && \
-    yum clean all
+  yum groupinstall 'Development Tools' -y && \
+  yum install -y procps vim less wget curl git python sysstat perf libtasn1 && \
+  yum clean all
 
 RUN case `uname -m` in \
-    x86_64) arch=x64; ;; \
-    aarch64) arch=arm64; ;; \
-    *) echo "platform=$(uname -m) un-supported, exit ..."; exit 1; ;; \
+  x86_64) arch=x64; ;; \
+  aarch64) arch=arm64; ;; \
+  *) echo "platform=$(uname -m) un-supported, exit ..."; exit 1; ;; \
   esac \
   && mkdir -p /usr/local/lib/async-profiler \
-  && curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5.1/async-profiler-2.5.1-linux-${arch}.tar.gz | tar -xz --strip-components 1 -C /usr/local/lib/async-profiler \
+  && curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-${arch}.tar.gz | tar -xz --strip-components 1 -C /usr/local/lib/async-profiler \
   && ln -s /usr/local/lib/async-profiler/profiler.sh /usr/local/bin/async-profiler
 
 CMD ["bash"]
diff --git a/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile b/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
index eaa1b8e02e..364da20d6b 100644
--- a/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
+++ b/docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
@@ -25,16 +25,16 @@ FROM ${JDK_IMAGE}:${JAVA_VERSION}-ubuntu
 LABEL MAINTAINER=dev@pinot.apache.org
 
 RUN apt-get update && \
-    apt-get install -y --no-install-recommends vim less wget curl git python sysstat procps linux-tools-generic libtasn1-6 && \
-    rm -rf /var/lib/apt/lists/*
+  apt-get install -y --no-install-recommends vim less wget curl git python sysstat procps linux-tools-generic libtasn1-6 && \
+  rm -rf /var/lib/apt/lists/*
 
 RUN case `uname -m` in \
-    x86_64) arch=x64; ;; \
-    aarch64) arch=arm64; ;; \
-    *) echo "platform=$(uname -m) un-supported, exit ..."; exit 1; ;; \
+  x86_64) arch=x64; ;; \
+  aarch64) arch=arm64; ;; \
+  *) echo "platform=$(uname -m) un-supported, exit ..."; exit 1; ;; \
   esac \
   && mkdir -p /usr/local/lib/async-profiler \
-  && curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5.1/async-profiler-2.5.1-linux-${arch}.tar.gz | tar -xz --strip-components 1 -C /usr/local/lib/async-profiler \
+  && curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-${arch}.tar.gz | tar -xz --strip-components 1 -C /usr/local/lib/async-profiler \
   && ln -s /usr/local/lib/async-profiler/profiler.sh /usr/local/bin/async-profiler
 
 CMD ["bash"]
diff --git a/docker/images/pinot-base/pinot-base-runtime/openjdk.dockerfile b/docker/images/pinot-base/pinot-base-runtime/openjdk.dockerfile
index 4064fc6dd4..e59787749f 100644
--- a/docker/images/pinot-base/pinot-base-runtime/openjdk.dockerfile
+++ b/docker/images/pinot-base/pinot-base-runtime/openjdk.dockerfile
@@ -16,7 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-ARG JAVA_VERSION=11
+ARG JAVA_VERSION=21
 ARG JDK_IMAGE=openjdk
 
 FROM ${JDK_IMAGE}:${JAVA_VERSION}-jdk-slim
@@ -24,16 +24,16 @@ FROM ${JDK_IMAGE}:${JAVA_VERSION}-jdk-slim
 LABEL MAINTAINER=dev@pinot.apache.org
 
 RUN apt-get update && \
-    apt-get install -y --no-install-recommends vim less wget curl git python sysstat procps linux-perf openjdk-11-dbg libtasn1-6 && \
-    rm -rf /var/lib/apt/lists/*
+  apt-get install -y --no-install-recommends vim less wget curl git python-is-python3 sysstat procps linux-perf libtasn1-6 && \
+  rm -rf /var/lib/apt/lists/*
 
 RUN case `uname -m` in \
-    x86_64) arch=x64; ;; \
-    aarch64) arch=arm64; ;; \
-    *) echo "platform=$(uname -m) un-supported, exit ..."; exit 1; ;; \
+  x86_64) arch=x64; ;; \
+  aarch64) arch=arm64; ;; \
+  *) echo "platform=$(uname -m) un-supported, exit ..."; exit 1; ;; \
   esac \
   && mkdir -p /usr/local/lib/async-profiler \
-  && curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5.1/async-profiler-2.5.1-linux-${arch}.tar.gz | tar -xz --strip-components 1 -C /usr/local/lib/async-profiler \
+  && curl -L https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-${arch}.tar.gz | tar -xz --strip-components 1 -C /usr/local/lib/async-profiler \
   && ln -s /usr/local/lib/async-profiler/profiler.sh /usr/local/bin/async-profiler
 
 CMD ["bash"]
diff --git a/docker/images/pinot/Dockerfile b/docker/images/pinot/Dockerfile
index 3e1bef0903..3378b6f645 100644
--- a/docker/images/pinot/Dockerfile
+++ b/docker/images/pinot/Dockerfile
@@ -16,17 +16,20 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-ARG PINOT_BASE_IMAGE_TAG=openjdk11
+ARG PINOT_BASE_IMAGE_TAG=11-amazoncorretto
 FROM apachepinot/pinot-base-build:${PINOT_BASE_IMAGE_TAG} AS pinot_build_env
 
 LABEL MAINTAINER=dev@pinot.apache.org
 
 ARG PINOT_BRANCH=master
-ARG KAFKA_VERSION=2.0
 ARG JDK_VERSION=11
 ARG PINOT_GIT_URL="https://github.com/apache/pinot.git"
 ARG CI=true
-RUN echo "Trying to build Pinot from [ ${PINOT_GIT_URL} ] on branch [ ${PINOT_BRANCH} ] with Kafka version [ ${KAFKA_VERSION} ] and CI [ ${CI} ]"
+
+RUN echo "Build Pinot based on image: apachepinot/pinot-base-build:${PINOT_BASE_IMAGE_TAG}"
+RUN echo "Current build system CPU arch is [ $(uname -m) ]"
+
+RUN echo "Trying to build Pinot from [ ${PINOT_GIT_URL} ] on branch [ ${PINOT_BRANCH} ] and CI [ ${CI} ]"
 ENV PINOT_HOME=/opt/pinot
 ENV PINOT_BUILD_DIR=/opt/pinot-build
 ENV MAVEN_HOME /usr/share/maven
@@ -56,9 +59,8 @@ COPY bin ${PINOT_HOME}/bin
 COPY etc ${PINOT_HOME}/etc
 COPY examples ${PINOT_HOME}/examples
 
-RUN wget -O ${PINOT_HOME}/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent-0.12.0.jar https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.12.0/jmx_prometheus_javaagent-0.12.0.jar
-RUN wget -O ${PINOT_HOME}/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent-0.16.1.jar https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.16.1/jmx_prometheus_javaagent-0.16.1.jar && \
-    ln -s ${PINOT_HOME}/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent-0.16.1.jar ${PINOT_HOME}/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent.jar
+RUN wget -O ${PINOT_HOME}/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent-0.18.0.jar https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.18.0/jmx_prometheus_javaagent-0.18.0.jar && \
+    ln -s ${PINOT_HOME}/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent-0.18.0.jar ${PINOT_HOME}/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent.jar
 
 # expose ports for controller/broker/server/admin
 EXPOSE 9000 8099 8098 8097 8096


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org