From aa1b814b3ef7dbb4fe7831f252aceaf8589fb32c Mon Sep 17 00:00:00 2001 From: James Turton Date: Fri, 2 Aug 2024 13:37:12 +0200 Subject: [PATCH] Single threaded Maven build. --- Dockerfile | 12 ++++++------ hooks/build | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30582dce4bf..148d7822314 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,15 +25,15 @@ # {docker|podman} build \ # --build-arg BUILD_BASE_IMAGE=maven:3.8.2-openjdk-11 \ # --build-arg BASE_IMAGE=openjdk:11 \ -# -t apache/drill-openjdk-11 +# -t apache/drill-openjdk-11 -# Unless otherwise specified, the intermediate container image will be +# Unless otherwise specified, the intermediate container image will be # based on the following default. -ARG BUILD_BASE_IMAGE=maven:3.8.2-openjdk-8 +ARG BUILD_BASE_IMAGE=maven:3-openjdk-17 # Unless otherwise specified, the final container image will be based on # the following default. -ARG BASE_IMAGE=openjdk:8 +ARG BASE_IMAGE=openjdk:17 # Uses intermediate image for building Drill to reduce target image size FROM $BUILD_BASE_IMAGE as build @@ -44,7 +44,7 @@ WORKDIR /src COPY . . # Builds Drill -RUN mvn -Dmaven.artifact.threads=5 -T1C clean install -DskipTests +RUN mvn clean install -DskipTests # Get project version and copy built binaries into /opt/drill directory RUN VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) \ @@ -54,7 +54,7 @@ RUN VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --n # Target image -# Set the BASE_IMAGE build arg when you invoke docker build. +# Set the BASE_IMAGE build arg when you invoke docker build. FROM $BASE_IMAGE # Starts Drill in embedded mode and connects to Sqlline diff --git a/hooks/build b/hooks/build index c7405607d71..6651195d8e4 100644 --- a/hooks/build +++ b/hooks/build @@ -21,7 +21,6 @@ docker build \ --build-arg BUILD_BASE_IMAGE=maven:3-openjdk-8 \ --build-arg BASE_IMAGE=openjdk:8 \ -t apache/drill:$DOCKER_TAG-openjdk-8 \ - -t apache/drill:$DOCKER_TAG \ . docker build \ @@ -34,4 +33,5 @@ docker build \ --build-arg BUILD_BASE_IMAGE=maven:3-openjdk-17 \ --build-arg BASE_IMAGE=openjdk:17-slim-bullseye \ -t apache/drill:$DOCKER_TAG-openjdk-17 \ + -t apache/drill:$DOCKER_TAG \ .