-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Pinot base build/runtime image support for Amazon Corretto and…
… MS OpenJDK (#10422)
- Loading branch information
Showing
10 changed files
with
217 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
64 changes: 64 additions & 0 deletions
64
docker/images/pinot-base/pinot-base-build/amazoncorretto.dockerfile
This file contains 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,64 @@ | ||
# | ||
# 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. | ||
# | ||
FROM debian:buster-slim | ||
|
||
ARG version=11.0.18.10-1 | ||
# In addition to installing the Amazon corretto, we also install | ||
# fontconfig. The folks who manage the docker hub's | ||
# official image library have found that font management | ||
# is a common usecase, and painpoint, and have | ||
# recommended that Java images include font support. | ||
# | ||
# See: | ||
# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java | ||
|
||
LABEL [email protected] | ||
|
||
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/* | ||
|
||
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 \ | ||
&& 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 | ||
|
||
# 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 | ||
|
||
CMD ["-help"] |
48 changes: 48 additions & 0 deletions
48
docker/images/pinot-base/pinot-base-build/ms-openjdk.dockerfile
This file contains 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,48 @@ | ||
# | ||
# 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. | ||
# | ||
ARG JAVA_VERSION=11 | ||
ARG JDK_IMAGE=mcr.microsoft.com/openjdk/jdk | ||
FROM ${JDK_IMAGE}:${JAVA_VERSION}-ubuntu AS pinot_build_env | ||
|
||
LABEL [email protected] | ||
|
||
# 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/* | ||
|
||
# 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 \ | ||
&& 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 | ||
|
||
# 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 | ||
|
||
CMD ["-help"] |
This file contains 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 |
---|---|---|
|
@@ -17,8 +17,8 @@ | |
# under the License. | ||
# | ||
ARG JAVA_VERSION=11 | ||
ARG OPENJDK_IMAGE=openjdk | ||
FROM ${OPENJDK_IMAGE}:${JAVA_VERSION} AS pinot_build_env | ||
ARG JDK_IMAGE=openjdk | ||
FROM ${JDK_IMAGE}:${JAVA_VERSION} AS pinot_build_env | ||
|
||
LABEL [email protected] | ||
|
||
|
40 changes: 40 additions & 0 deletions
40
docker/images/pinot-base/pinot-base-runtime/amazoncorretto.dockerfile
This file contains 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,40 @@ | ||
# | ||
# 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. | ||
# | ||
ARG JAVA_VERSION=11 | ||
ARG JDK_IMAGE=amazoncorretto | ||
|
||
FROM ${JDK_IMAGE}:${JAVA_VERSION}-al2-jdk | ||
|
||
LABEL [email protected] | ||
|
||
RUN yum update -y && \ | ||
yum groupinstall 'Development Tools' -y && \ | ||
yum install -y procps vim less wget curl git python sysstat perf && \ | ||
yum clean all | ||
|
||
RUN case `uname -m` in \ | ||
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 \ | ||
&& ln -s /usr/local/lib/async-profiler/profiler.sh /usr/local/bin/async-profiler | ||
|
||
CMD ["bash"] |
40 changes: 40 additions & 0 deletions
40
docker/images/pinot-base/pinot-base-runtime/ms-openjdk.dockerfile
This file contains 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,40 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
ARG JAVA_VERSION=11 | ||
ARG JDK_IMAGE=mcr.microsoft.com/openjdk/jdk | ||
|
||
FROM ${JDK_IMAGE}:${JAVA_VERSION}-ubuntu | ||
|
||
LABEL [email protected] | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends vim less wget curl git python sysstat procps linux-tools-generic && \ | ||
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; ;; \ | ||
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 \ | ||
&& ln -s /usr/local/lib/async-profiler/profiler.sh /usr/local/bin/async-profiler | ||
|
||
CMD ["bash"] |
This file contains 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 |
---|---|---|
|
@@ -17,9 +17,9 @@ | |
# under the License. | ||
# | ||
ARG JAVA_VERSION=11 | ||
ARG OPENJDK_IMAGE=openjdk | ||
ARG JDK_IMAGE=openjdk | ||
|
||
FROM ${OPENJDK_IMAGE}:${JAVA_VERSION}-jdk-slim | ||
FROM ${JDK_IMAGE}:${JAVA_VERSION}-jdk-slim | ||
|
||
LABEL [email protected] | ||
|
||
|