Skip to content

Commit ec21d48

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

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ jobs:
163163
export SHELL=/bin/bash
164164
export DOCKER_BUILDKIT=1
165165
eval $(minikube -p minikube docker-env)
166-
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain .
166+
export JAVA_VERSION=${{ matrix.java-version }}
167+
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain --build-arg JAVA_VERSION="${JAVA_VERSION:-11}" .
167168
docker images
168169
- name: Start the operator
169170
run: |

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
# limitations under the License.
1717
################################################################################
1818
# Build
19-
FROM maven:3.8.4-eclipse-temurin-11 AS build
19+
ARG JAVA_VERSION=11
20+
FROM maven:3.8.8-eclipse-temurin-${JAVA_VERSION} AS build
2021
ARG SKIP_TESTS=true
2122

2223
WORKDIR /app
@@ -33,7 +34,7 @@ RUN cd /app/tools/license; mkdir jars; cd jars; \
3334
cd ../ && ./collect_license_files.sh ./jars ./licenses-output
3435

3536
# stage
36-
FROM eclipse-temurin:11-jre-jammy
37+
FROM eclipse-temurin:${JAVA_VERSION}-jre-jammy
3738
ENV FLINK_HOME=/opt/flink
3839
ENV FLINK_PLUGINS_DIR=$FLINK_HOME/plugins
3940
ENV OPERATOR_VERSION=1.10-SNAPSHOT

0 commit comments

Comments
 (0)