Skip to content

Commit f6e95b8

Browse files
committed
[FlINK-36392] build and run using the targeted jre
1 parent b241cda commit f6e95b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@
1919
ARG JAVA_VERSION=11
2020
FROM maven:3.8.4-eclipse-temurin-${JAVA_VERSION} AS build
2121
ARG SKIP_TESTS=true
22+
ARG M2_HOME=${HOME}/m2
2223

2324
WORKDIR /app
2425

2526
COPY . .
2627

27-
RUN --mount=type=cache,target=/root/.m2 mvn -ntp clean install -pl flink-kubernetes-standalone,flink-kubernetes-operator-api,flink-kubernetes-operator,flink-autoscaler,flink-kubernetes-webhook -DskipTests=$SKIP_TESTS
28+
RUN --mount=type=bind,source=${M2_HOME},target=/root/.m2 \
29+
mvn -ntp clean install \
30+
-pl flink-kubernetes-standalone,flink-kubernetes-operator-api,flink-kubernetes-operator,flink-autoscaler,flink-kubernetes-webhook -DskipTests=$SKIP_TESTS
2831

2932
RUN cd /app/tools/license; mkdir jars; cd jars; \
3033
cp /app/flink-kubernetes-operator/target/flink-kubernetes-operator-*-shaded.jar . && \

0 commit comments

Comments
 (0)