From 9d3f328379bcf6b467cd6d94ef3c7e6a79485601 Mon Sep 17 00:00:00 2001 From: Ruufuus Date: Wed, 26 Feb 2025 18:12:45 +0100 Subject: [PATCH] MET-6328 Move plugin installation to different docker image --- docker/flink-node-with-application/Dockerfile | 9 +++++++++ docker/flink_java21/Dockerfile | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docker/flink-node-with-application/Dockerfile b/docker/flink-node-with-application/Dockerfile index 6d5419f..ecc9d7c 100644 --- a/docker/flink-node-with-application/Dockerfile +++ b/docker/flink-node-with-application/Dockerfile @@ -1,6 +1,15 @@ FROM flink-node-poc:latest MAINTAINER PSNC + +ENV FLINK_HOME=/opt/flink \ + FLINK_VERSION=1.20.0 \ + FLINK_S3_PRESTO_URL=https://repo1.maven.org/maven2/org/apache/flink/flink-s3-fs-presto/$FLINK_VERSION/flink-s3-fs-presto-$FLINK_VERSIONI.jar + COPY ./docker/flink-node-with-application/flink-connector-cassandra_2.12-3.1.0-1.17.jar /opt/flink/lib/ COPY ./docker/flink-node-with-application/metrics-core-3.0.2.jar /opt/flink/lib/ COPY ./flinkPoCPG/target/flink-poc-postgres.jar /opt/flink/lib/ + +RUN mkdir -p $FLINK_HOME/plugins/s3-fs-presto +RUN wget $FLINK_S3_PRESTO_URL -O $FLINK_HOME/plugins/s3-fs-presto/flink-s3-fs-presto-$FLINK_VERSION.jar +RUN chown -R flink:flink $FLINK_HOME/plugins \ No newline at end of file diff --git a/docker/flink_java21/Dockerfile b/docker/flink_java21/Dockerfile index e137c30..2f61bf7 100644 --- a/docker/flink_java21/Dockerfile +++ b/docker/flink_java21/Dockerfile @@ -46,7 +46,6 @@ RUN set -ex; \ # Configure Flink version ENV FLINK_TGZ_URL=https://dlcdn.apache.org/flink/flink-1.20.0/flink-1.20.0-bin-scala_2.12.tgz \ FLINK_ASC_URL=https://downloads.apache.org/flink/flink-1.20.0/flink-1.20.0-bin-scala_2.12.tgz.asc \ - FLINK_S3_PRESTO_URL=https://repo1.maven.org/maven2/org/apache/flink/flink-s3-fs-presto/1.20.0/flink-s3-fs-presto-1.20.0.jar \ GPG_KEY=B2D64016B940A7E0B9B72E0D7D0528B28037D8BC \ CHECK_GPG=true @@ -88,9 +87,6 @@ RUN set -ex; \ sed -i 's/taskmanager.bind-host: localhost/taskmanager.bind-host: 0.0.0.0/g' $FLINK_HOME/conf/config.yaml; \ sed -i '/taskmanager.host: localhost/d' $FLINK_HOME/conf/config.yaml; -RUN mkdir -p $FLINK_HOME/plugins/s3-fs-presto -RUN wget $FLINK_S3_PRESTO_URL -O $FLINK_HOME/plugins/s3-fs-presto/flink-s3-fs-presto-1.20.0.jar -RUN chown -R flink:flink $FLINK_HOME/plugins # Configure container COPY docker-entrypoint.sh /