You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by dz...@apache.org on 2021/09/17 08:53:38 UTC
[drill] 04/09: Base the build container on OpenJDK 8 to maintain
compat with JDK >= 8
This is an automated email from the ASF dual-hosted git repository.
dzamo pushed a commit to branch 7999-docker-jdk
in repository https://gitbox.apache.org/repos/asf/drill.git
commit 1c725c7b996002d13a001cc203abe9216c3172c0
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Thu Sep 16 15:14:22 2021 +0200
Base the build container on OpenJDK 8 to maintain compat with JDK >= 8
---
Dockerfile | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 6976a90..51e5423 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,12 +18,15 @@
# This Dockerfile is used for automated builds in DockerHub. It adds
# project sources into the build image, builds Drill and copies built
-# binaries into the target image based on the image name in BASE_NAME
-# env var which you should set when invoking docker build.
-# Example BASE_NAME values: openjdk:8-jre, openjdk:11-jre, openjdk:latest
+# binaries into the target image based on the image name in BASE_IMAGE
+# build arg which you should set when invoking docker build.
+# Example syntax: docker build --build-arg BASE_IMAGE="openjdk:8-jre"
+
+ARG $BASE_IMAGE=openjdk:11-jre
# Uses intermediate image for building Drill to reduce target image size
-FROM maven:3.8.2-openjdk-11 as build
+# Build using OpenJDK 8 to maintain compatibility with all OpenJDK >= 8
+FROM maven:3.8.2-openjdk-8 as build
WORKDIR /src
@@ -53,7 +56,7 @@ RUN VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --n
# Target image
-# Set the BASE_IMAGE env var when you invoke docker build.
+# Set the BASE_IMAGE build arg when you invoke docker build.
FROM $BASE_IMAGE
ENV DRILL_HOME=/opt/drill