Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/processing/flink_jobs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ ARG PYFLINK_KAFKA_JAR_VERSION=5.0.0-2.2
# away from the Flink binary distribution version above.
COPY processing/flink_jobs/requirements.txt /tmp/flink-requirements.txt

# archive.apache.org throttles aggressively and a wedged connection produces
# zero curl output — CI builds hung here for 10-30 min (flink-smoke #213/#218/
# #219/#220 lanes). The speed guard aborts any transfer crawling below 64 KB/s
# for 60 s and retries, so a throttled mirror fails fast instead of hanging.
ARG CURL_GUARDS="--connect-timeout 30 --speed-limit 65536 --speed-time 60 --retry 5 --retry-all-errors"

RUN apt-get update \
&& apt-get install -y --no-install-recommends bash ca-certificates curl openjdk-17-jre-headless \
&& curl -fsSL "https://archive.apache.org/dist/flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-scala_${SCALA_VERSION}.tgz" -o /tmp/flink.tgz \
&& curl -fsSL $CURL_GUARDS "https://archive.apache.org/dist/flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-scala_${SCALA_VERSION}.tgz" -o /tmp/flink.tgz \
&& tar -xzf /tmp/flink.tgz -C /opt \
&& ln -s "/opt/flink-${FLINK_VERSION}" /opt/flink \
&& curl -fsSL "https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka/${PYFLINK_KAFKA_JAR_VERSION}/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" -o "/opt/flink/lib/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" \
&& curl -fsSL $CURL_GUARDS "https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka/${PYFLINK_KAFKA_JAR_VERSION}/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" -o "/opt/flink/lib/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" \
&& mkdir -p /opt/flink/plugins/s3-fs-hadoop \
&& ln -s "/opt/flink/opt/flink-s3-fs-hadoop-${FLINK_VERSION}.jar" "/opt/flink/plugins/s3-fs-hadoop/flink-s3-fs-hadoop-${FLINK_VERSION}.jar" \
&& test -e "/opt/flink/plugins/s3-fs-hadoop/flink-s3-fs-hadoop-${FLINK_VERSION}.jar" \
Expand Down