Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Flink 1.15.2 #13065

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Update to Flink 1.15.2 #13065

merged 1 commit into from
Sep 7, 2022

Conversation

zentol
Copy link
Contributor

@zentol zentol commented Aug 29, 2022

No description provided.

@zentol
Copy link
Contributor Author

zentol commented Aug 29, 2022

hmm, not really sure what to make of the naughty error message :/

@tianon
Copy link
Member

tianon commented Aug 29, 2022

That's unfortunately the downstream effect of docker-library/docs#2162 (comment) -- openjdk:8* and openjdk:11* are no longer maintained/supported.

See the top notice on https://hub.docker.com/_/openjdk for a list of alternative images/builds of OpenJDK 8 and 11 that might meet your needs.

@zentol
Copy link
Contributor Author

zentol commented Aug 30, 2022

Got it, unfortunate that none of us noticed your ping :/

We'll get right on that. 👍

@zentol
Copy link
Contributor Author

zentol commented Sep 5, 2022

@tianon We've updated the images to be based on eclipse-temurin. Would it be possible to merge this on Wednesday (September 7th) so we can give our users some notice beforehand?

- remove unsupported 1.11-1.13
- updated 1.14.5 to eclipse-temurin base
- fixed malloc switch on ARM
- add 1.15.2
@github-actions
Copy link

github-actions bot commented Sep 5, 2022

Diff for 36f6555:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 1f6b98c..724631a 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,80 +1,32 @@
 Maintainers: The Apache Flink Project <[email protected]> (@ApacheFlink)
 GitRepo: https://github.com/apache/flink-docker.git
 
-Tags: 1.11.6-scala_2.11-java8, 1.11-scala_2.11-java8, 1.11.6-scala_2.11, 1.11-scala_2.11
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.11/scala_2.11-java8-debian
-
-Tags: 1.11.6-scala_2.11-java11, 1.11-scala_2.11-java11
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.11/scala_2.11-java11-debian
-
-Tags: 1.11.6-scala_2.12-java8, 1.11-scala_2.12-java8, 1.11.6-scala_2.12, 1.11-scala_2.12, 1.11.6-java8, 1.11-java8, 1.11.6, 1.11
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.11/scala_2.12-java8-debian
-
-Tags: 1.11.6-scala_2.12-java11, 1.11-scala_2.12-java11, 1.11.6-java11, 1.11-java11
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.11/scala_2.12-java11-debian
-
-Tags: 1.12.7-scala_2.11-java8, 1.12-scala_2.11-java8, 1.12.7-scala_2.11, 1.12-scala_2.11
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.12/scala_2.11-java8-debian
-
-Tags: 1.12.7-scala_2.11-java11, 1.12-scala_2.11-java11
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.12/scala_2.11-java11-debian
-
-Tags: 1.12.7-scala_2.12-java8, 1.12-scala_2.12-java8, 1.12.7-scala_2.12, 1.12-scala_2.12, 1.12.7-java8, 1.12-java8, 1.12.7, 1.12
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.12/scala_2.12-java8-debian
-
-Tags: 1.12.7-scala_2.12-java11, 1.12-scala_2.12-java11, 1.12.7-java11, 1.12-java11
-GitCommit: 79bcbe515597ed4639da10709742cdcbe331fbc3
-Directory: 1.12/scala_2.12-java11-debian
-
-Tags: 1.13.6-scala_2.11-java8, 1.13-scala_2.11-java8, 1.13.6-scala_2.11, 1.13-scala_2.11
-GitCommit: 3dd2ef7d59ff91800fc82be1f0f04b01db9080bf
-Directory: 1.13/scala_2.11-java8-debian
-
-Tags: 1.13.6-scala_2.11-java11, 1.13-scala_2.11-java11
-GitCommit: 3dd2ef7d59ff91800fc82be1f0f04b01db9080bf
-Directory: 1.13/scala_2.11-java11-debian
-
-Tags: 1.13.6-scala_2.12-java8, 1.13-scala_2.12-java8, 1.13.6-scala_2.12, 1.13-scala_2.12, 1.13.6-java8, 1.13-java8, 1.13.6, 1.13
-GitCommit: 3dd2ef7d59ff91800fc82be1f0f04b01db9080bf
-Directory: 1.13/scala_2.12-java8-debian
-
-Tags: 1.13.6-scala_2.12-java11, 1.13-scala_2.12-java11, 1.13.6-java11, 1.13-java11
-GitCommit: 3dd2ef7d59ff91800fc82be1f0f04b01db9080bf
-Directory: 1.13/scala_2.12-java11-debian
-
 Tags: 1.14.5-scala_2.11-java8, 1.14-scala_2.11-java8, 1.14.5-scala_2.11, 1.14-scala_2.11
 Architectures: amd64, arm64v8
-GitCommit: bf3014dc4e866d0d213a45cea17010c2380b7e6b
-Directory: 1.14/scala_2.11-java8-debian
+GitCommit: 4794f9425513fb4c0b55ec1efd629e8eb7e5d8c5
+Directory: 1.14/scala_2.11-java8-ubuntu
 
 Tags: 1.14.5-scala_2.11-java11, 1.14-scala_2.11-java11
 Architectures: amd64, arm64v8
-GitCommit: bf3014dc4e866d0d213a45cea17010c2380b7e6b
-Directory: 1.14/scala_2.11-java11-debian
+GitCommit: 4794f9425513fb4c0b55ec1efd629e8eb7e5d8c5
+Directory: 1.14/scala_2.11-java11-ubuntu
 
 Tags: 1.14.5-scala_2.12-java8, 1.14-scala_2.12-java8, 1.14.5-scala_2.12, 1.14-scala_2.12, 1.14.5-java8, 1.14-java8, 1.14.5, 1.14
 Architectures: amd64, arm64v8
-GitCommit: bf3014dc4e866d0d213a45cea17010c2380b7e6b
-Directory: 1.14/scala_2.12-java8-debian
+GitCommit: 4794f9425513fb4c0b55ec1efd629e8eb7e5d8c5
+Directory: 1.14/scala_2.12-java8-ubuntu
 
 Tags: 1.14.5-scala_2.12-java11, 1.14-scala_2.12-java11, 1.14.5-java11, 1.14-java11
 Architectures: amd64, arm64v8
-GitCommit: bf3014dc4e866d0d213a45cea17010c2380b7e6b
-Directory: 1.14/scala_2.12-java11-debian
+GitCommit: 4794f9425513fb4c0b55ec1efd629e8eb7e5d8c5
+Directory: 1.14/scala_2.12-java11-ubuntu
 
-Tags: 1.15.1-scala_2.12-java8, 1.15-scala_2.12-java8, scala_2.12-java8, 1.15.1-java8, 1.15-java8, java8
+Tags: 1.15.2-scala_2.12-java8, 1.15-scala_2.12-java8, scala_2.12-java8, 1.15.2-java8, 1.15-java8, java8
 Architectures: amd64, arm64v8
-GitCommit: 7d39879cd5596989f856dbd75ce9804829c22b2e
-Directory: 1.15/scala_2.12-java8-debian
+GitCommit: 4794f9425513fb4c0b55ec1efd629e8eb7e5d8c5
+Directory: 1.15/scala_2.12-java8-ubuntu
 
-Tags: 1.15.1-scala_2.12-java11, 1.15-scala_2.12-java11, scala_2.12-java11, 1.15.1-scala_2.12, 1.15-scala_2.12, scala_2.12, 1.15.1-java11, 1.15-java11, java11, 1.15.1, 1.15, latest
+Tags: 1.15.2-scala_2.12-java11, 1.15-scala_2.12-java11, scala_2.12-java11, 1.15.2-scala_2.12, 1.15-scala_2.12, scala_2.12, 1.15.2-java11, 1.15-java11, java11, 1.15.2, 1.15, latest
 Architectures: amd64, arm64v8
-GitCommit: 7d39879cd5596989f856dbd75ce9804829c22b2e
-Directory: 1.15/scala_2.12-java11-debian
+GitCommit: 4794f9425513fb4c0b55ec1efd629e8eb7e5d8c5
+Directory: 1.15/scala_2.12-java11-ubuntu
diff --git a/_bashbrew-list b/_bashbrew-list
index 62ca6b0..f1c39a1 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,57 +1,3 @@
-flink:1.11
-flink:1.11-java8
-flink:1.11-java11
-flink:1.11-scala_2.11
-flink:1.11-scala_2.11-java8
-flink:1.11-scala_2.11-java11
-flink:1.11-scala_2.12
-flink:1.11-scala_2.12-java8
-flink:1.11-scala_2.12-java11
-flink:1.11.6
-flink:1.11.6-java8
-flink:1.11.6-java11
-flink:1.11.6-scala_2.11
-flink:1.11.6-scala_2.11-java8
-flink:1.11.6-scala_2.11-java11
-flink:1.11.6-scala_2.12
-flink:1.11.6-scala_2.12-java8
-flink:1.11.6-scala_2.12-java11
-flink:1.12
-flink:1.12-java8
-flink:1.12-java11
-flink:1.12-scala_2.11
-flink:1.12-scala_2.11-java8
-flink:1.12-scala_2.11-java11
-flink:1.12-scala_2.12
-flink:1.12-scala_2.12-java8
-flink:1.12-scala_2.12-java11
-flink:1.12.7
-flink:1.12.7-java8
-flink:1.12.7-java11
-flink:1.12.7-scala_2.11
-flink:1.12.7-scala_2.11-java8
-flink:1.12.7-scala_2.11-java11
-flink:1.12.7-scala_2.12
-flink:1.12.7-scala_2.12-java8
-flink:1.12.7-scala_2.12-java11
-flink:1.13
-flink:1.13-java8
-flink:1.13-java11
-flink:1.13-scala_2.11
-flink:1.13-scala_2.11-java8
-flink:1.13-scala_2.11-java11
-flink:1.13-scala_2.12
-flink:1.13-scala_2.12-java8
-flink:1.13-scala_2.12-java11
-flink:1.13.6
-flink:1.13.6-java8
-flink:1.13.6-java11
-flink:1.13.6-scala_2.11
-flink:1.13.6-scala_2.11-java8
-flink:1.13.6-scala_2.11-java11
-flink:1.13.6-scala_2.12
-flink:1.13.6-scala_2.12-java8
-flink:1.13.6-scala_2.12-java11
 flink:1.14
 flink:1.14-java8
 flink:1.14-java11
@@ -76,12 +22,12 @@ flink:1.15-java11
 flink:1.15-scala_2.12
 flink:1.15-scala_2.12-java8
 flink:1.15-scala_2.12-java11
-flink:1.15.1
-flink:1.15.1-java8
-flink:1.15.1-java11
-flink:1.15.1-scala_2.12
-flink:1.15.1-scala_2.12-java8
-flink:1.15.1-scala_2.12-java11
+flink:1.15.2
+flink:1.15.2-java8
+flink:1.15.2-java11
+flink:1.15.2-scala_2.12
+flink:1.15.2-scala_2.12-java8
+flink:1.15.2-scala_2.12-java11
 flink:java8
 flink:java11
 flink:latest
diff --git a/flink_1.11-java11/Dockerfile b/flink_1.11-java11/Dockerfile
deleted file mode 100644
index cbf2acf..0000000
diff --git a/flink_1.11-java11/docker-entrypoint.sh b/flink_1.11-java11/docker-entrypoint.sh
deleted file mode 100755
index 6084f06..0000000
diff --git a/flink_1.11-scala_2.11-java11/Dockerfile b/flink_1.11-scala_2.11-java11/Dockerfile
deleted file mode 100644
index bee0d0e..0000000
diff --git a/flink_1.11-scala_2.11-java11/docker-entrypoint.sh b/flink_1.11-scala_2.11-java11/docker-entrypoint.sh
deleted file mode 100755
index 6084f06..0000000
diff --git a/flink_1.11-scala_2.11/Dockerfile b/flink_1.11-scala_2.11/Dockerfile
deleted file mode 100644
index ddcad12..0000000
diff --git a/flink_1.11-scala_2.11/docker-entrypoint.sh b/flink_1.11-scala_2.11/docker-entrypoint.sh
deleted file mode 100755
index 6084f06..0000000
diff --git a/flink_1.11/Dockerfile b/flink_1.11/Dockerfile
deleted file mode 100644
index 06a6e60..0000000
diff --git a/flink_1.11/docker-entrypoint.sh b/flink_1.11/docker-entrypoint.sh
deleted file mode 100755
index 6084f06..0000000
diff --git a/flink_1.12-java11/Dockerfile b/flink_1.12-java11/Dockerfile
deleted file mode 100644
index afd7fec..0000000
diff --git a/flink_1.12-java11/docker-entrypoint.sh b/flink_1.12-java11/docker-entrypoint.sh
deleted file mode 100755
index 275488e..0000000
diff --git a/flink_1.12-scala_2.11-java11/Dockerfile b/flink_1.12-scala_2.11-java11/Dockerfile
deleted file mode 100644
index 0d9328f..0000000
diff --git a/flink_1.12-scala_2.11-java11/docker-entrypoint.sh b/flink_1.12-scala_2.11-java11/docker-entrypoint.sh
deleted file mode 100755
index 275488e..0000000
diff --git a/flink_1.12-scala_2.11/Dockerfile b/flink_1.12-scala_2.11/Dockerfile
deleted file mode 100644
index 3034671..0000000
diff --git a/flink_1.12-scala_2.11/docker-entrypoint.sh b/flink_1.12-scala_2.11/docker-entrypoint.sh
deleted file mode 100755
index 275488e..0000000
diff --git a/flink_1.12/Dockerfile b/flink_1.12/Dockerfile
deleted file mode 100644
index f9f7ac8..0000000
diff --git a/flink_1.12/docker-entrypoint.sh b/flink_1.12/docker-entrypoint.sh
deleted file mode 100755
index 275488e..0000000
diff --git a/flink_1.13-java11/Dockerfile b/flink_1.13-java11/Dockerfile
deleted file mode 100644
index 180d048..0000000
diff --git a/flink_1.13-java11/docker-entrypoint.sh b/flink_1.13-java11/docker-entrypoint.sh
deleted file mode 100755
index f815838..0000000
diff --git a/flink_1.13-scala_2.11-java11/Dockerfile b/flink_1.13-scala_2.11-java11/Dockerfile
deleted file mode 100644
index f7fad32..0000000
diff --git a/flink_1.13-scala_2.11-java11/docker-entrypoint.sh b/flink_1.13-scala_2.11-java11/docker-entrypoint.sh
deleted file mode 100755
index f815838..0000000
diff --git a/flink_1.13-scala_2.11/Dockerfile b/flink_1.13-scala_2.11/Dockerfile
deleted file mode 100644
index ace4b73..0000000
diff --git a/flink_1.13-scala_2.11/docker-entrypoint.sh b/flink_1.13-scala_2.11/docker-entrypoint.sh
deleted file mode 100755
index f815838..0000000
diff --git a/flink_1.13/Dockerfile b/flink_1.13/Dockerfile
deleted file mode 100644
index b92eca2..0000000
diff --git a/flink_1.13/docker-entrypoint.sh b/flink_1.13/docker-entrypoint.sh
deleted file mode 100755
index f815838..0000000
diff --git a/flink_1.14-java11/Dockerfile b/flink_1.14-java11/Dockerfile
index 5aa7d40..aef47bd 100644
--- a/flink_1.14-java11/Dockerfile
+++ b/flink_1.14-java11/Dockerfile
@@ -16,12 +16,12 @@
 # limitations under the License.
 ###############################################################################
 
-FROM openjdk:11-jre
+FROM eclipse-temurin:11-jre-jammy
 
 # Install dependencies
 RUN set -ex; \
   apt-get update; \
-  apt-get -y install libsnappy1v5 gettext-base libjemalloc-dev; \
+  apt-get -y install gpg libsnappy1v5 gettext-base libjemalloc-dev; \
   rm -rf /var/lib/apt/lists/*
 
 # Grab gosu for easy step-down from root
diff --git a/flink_1.14-java11/docker-entrypoint.sh b/flink_1.14-java11/docker-entrypoint.sh
index 84fca0c..8b0350e 100755
--- a/flink_1.14-java11/docker-entrypoint.sh
+++ b/flink_1.14-java11/docker-entrypoint.sh
@@ -91,7 +91,20 @@ prepare_configuration() {
 
 maybe_enable_jemalloc() {
     if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
-        export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+        JEMALLOC_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so"
+        JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+        if [ -f "$JEMALLOC_PATH" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_PATH
+        elif [ -f "$JEMALLOC_FALLBACK" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_FALLBACK
+        else
+            if [ "$JEMALLOC_PATH" = "$JEMALLOC_FALLBACK" ]; then
+                MSG_PATH=$JEMALLOC_PATH
+            else
+                MSG_PATH="$JEMALLOC_PATH and $JEMALLOC_FALLBACK"
+            fi
+            echo "WARNING: attempted to load jemalloc from $MSG_PATH but the library couldn't be found. glibc will be used instead."
+        fi
     fi
 }
 
diff --git a/flink_1.14-scala_2.11-java11/Dockerfile b/flink_1.14-scala_2.11-java11/Dockerfile
index 2c8d2a4..59841ac 100644
--- a/flink_1.14-scala_2.11-java11/Dockerfile
+++ b/flink_1.14-scala_2.11-java11/Dockerfile
@@ -16,12 +16,12 @@
 # limitations under the License.
 ###############################################################################
 
-FROM openjdk:11-jre
+FROM eclipse-temurin:11-jre-jammy
 
 # Install dependencies
 RUN set -ex; \
   apt-get update; \
-  apt-get -y install libsnappy1v5 gettext-base libjemalloc-dev; \
+  apt-get -y install gpg libsnappy1v5 gettext-base libjemalloc-dev; \
   rm -rf /var/lib/apt/lists/*
 
 # Grab gosu for easy step-down from root
diff --git a/flink_1.14-scala_2.11-java11/docker-entrypoint.sh b/flink_1.14-scala_2.11-java11/docker-entrypoint.sh
index 84fca0c..8b0350e 100755
--- a/flink_1.14-scala_2.11-java11/docker-entrypoint.sh
+++ b/flink_1.14-scala_2.11-java11/docker-entrypoint.sh
@@ -91,7 +91,20 @@ prepare_configuration() {
 
 maybe_enable_jemalloc() {
     if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
-        export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+        JEMALLOC_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so"
+        JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+        if [ -f "$JEMALLOC_PATH" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_PATH
+        elif [ -f "$JEMALLOC_FALLBACK" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_FALLBACK
+        else
+            if [ "$JEMALLOC_PATH" = "$JEMALLOC_FALLBACK" ]; then
+                MSG_PATH=$JEMALLOC_PATH
+            else
+                MSG_PATH="$JEMALLOC_PATH and $JEMALLOC_FALLBACK"
+            fi
+            echo "WARNING: attempted to load jemalloc from $MSG_PATH but the library couldn't be found. glibc will be used instead."
+        fi
     fi
 }
 
diff --git a/flink_1.14-scala_2.11/Dockerfile b/flink_1.14-scala_2.11/Dockerfile
index 30711a6..7bfd0d1 100644
--- a/flink_1.14-scala_2.11/Dockerfile
+++ b/flink_1.14-scala_2.11/Dockerfile
@@ -16,12 +16,12 @@
 # limitations under the License.
 ###############################################################################
 
-FROM openjdk:8-jre
+FROM eclipse-temurin:8-jre-jammy
 
 # Install dependencies
 RUN set -ex; \
   apt-get update; \
-  apt-get -y install libsnappy1v5 gettext-base libjemalloc-dev; \
+  apt-get -y install gpg libsnappy1v5 gettext-base libjemalloc-dev; \
   rm -rf /var/lib/apt/lists/*
 
 # Grab gosu for easy step-down from root
diff --git a/flink_1.14-scala_2.11/docker-entrypoint.sh b/flink_1.14-scala_2.11/docker-entrypoint.sh
index 84fca0c..8b0350e 100755
--- a/flink_1.14-scala_2.11/docker-entrypoint.sh
+++ b/flink_1.14-scala_2.11/docker-entrypoint.sh
@@ -91,7 +91,20 @@ prepare_configuration() {
 
 maybe_enable_jemalloc() {
     if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
-        export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+        JEMALLOC_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so"
+        JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+        if [ -f "$JEMALLOC_PATH" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_PATH
+        elif [ -f "$JEMALLOC_FALLBACK" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_FALLBACK
+        else
+            if [ "$JEMALLOC_PATH" = "$JEMALLOC_FALLBACK" ]; then
+                MSG_PATH=$JEMALLOC_PATH
+            else
+                MSG_PATH="$JEMALLOC_PATH and $JEMALLOC_FALLBACK"
+            fi
+            echo "WARNING: attempted to load jemalloc from $MSG_PATH but the library couldn't be found. glibc will be used instead."
+        fi
     fi
 }
 
diff --git a/flink_1.14/Dockerfile b/flink_1.14/Dockerfile
index 44b28c5..cbee9e9 100644
--- a/flink_1.14/Dockerfile
+++ b/flink_1.14/Dockerfile
@@ -16,12 +16,12 @@
 # limitations under the License.
 ###############################################################################
 
-FROM openjdk:8-jre
+FROM eclipse-temurin:8-jre-jammy
 
 # Install dependencies
 RUN set -ex; \
   apt-get update; \
-  apt-get -y install libsnappy1v5 gettext-base libjemalloc-dev; \
+  apt-get -y install gpg libsnappy1v5 gettext-base libjemalloc-dev; \
   rm -rf /var/lib/apt/lists/*
 
 # Grab gosu for easy step-down from root
diff --git a/flink_1.14/docker-entrypoint.sh b/flink_1.14/docker-entrypoint.sh
index 84fca0c..8b0350e 100755
--- a/flink_1.14/docker-entrypoint.sh
+++ b/flink_1.14/docker-entrypoint.sh
@@ -91,7 +91,20 @@ prepare_configuration() {
 
 maybe_enable_jemalloc() {
     if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
-        export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+        JEMALLOC_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so"
+        JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+        if [ -f "$JEMALLOC_PATH" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_PATH
+        elif [ -f "$JEMALLOC_FALLBACK" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_FALLBACK
+        else
+            if [ "$JEMALLOC_PATH" = "$JEMALLOC_FALLBACK" ]; then
+                MSG_PATH=$JEMALLOC_PATH
+            else
+                MSG_PATH="$JEMALLOC_PATH and $JEMALLOC_FALLBACK"
+            fi
+            echo "WARNING: attempted to load jemalloc from $MSG_PATH but the library couldn't be found. glibc will be used instead."
+        fi
     fi
 }
 
diff --git a/flink_java8/Dockerfile b/flink_java8/Dockerfile
index 5fcb32c..10e6b22 100644
--- a/flink_java8/Dockerfile
+++ b/flink_java8/Dockerfile
@@ -16,12 +16,12 @@
 # limitations under the License.
 ###############################################################################
 
-FROM openjdk:8-jre
+FROM eclipse-temurin:8-jre-jammy
 
 # Install dependencies
 RUN set -ex; \
   apt-get update; \
-  apt-get -y install libsnappy1v5 gettext-base libjemalloc-dev; \
+  apt-get -y install gpg libsnappy1v5 gettext-base libjemalloc-dev; \
   rm -rf /var/lib/apt/lists/*
 
 # Grab gosu for easy step-down from root
@@ -44,9 +44,9 @@ RUN set -ex; \
   gosu nobody true
 
 # Configure Flink version
-ENV FLINK_TGZ_URL=https://www.apache.org/dyn/closer.cgi?action=download&filename=flink/flink-1.15.1/flink-1.15.1-bin-scala_2.12.tgz \
-    FLINK_ASC_URL=https://www.apache.org/dist/flink/flink-1.15.1/flink-1.15.1-bin-scala_2.12.tgz.asc \
-    GPG_KEY=7D660377995CA7A5AFEBA79A3EE012FEE982F098 \
+ENV FLINK_TGZ_URL=https://www.apache.org/dyn/closer.cgi?action=download&filename=flink/flink-1.15.2/flink-1.15.2-bin-scala_2.12.tgz \
+    FLINK_ASC_URL=https://www.apache.org/dist/flink/flink-1.15.2/flink-1.15.2-bin-scala_2.12.tgz.asc \
+    GPG_KEY=0F79F2AFB2351BC29678544591F9C1EC125FD8DB \
     CHECK_GPG=true
 
 # Prepare environment
@@ -79,7 +79,7 @@ RUN set -ex; \
   rm flink.tgz; \
   \
   chown -R flink:flink .; \
-
+  \
   # Replace default REST/RPC endpoint bind address to use the container's network interface \
   sed -i 's/rest.address: localhost/rest.address: 0.0.0.0/g' $FLINK_HOME/conf/flink-conf.yaml; \
   sed -i 's/rest.bind-address: localhost/rest.bind-address: 0.0.0.0/g' $FLINK_HOME/conf/flink-conf.yaml; \
diff --git a/flink_java8/docker-entrypoint.sh b/flink_java8/docker-entrypoint.sh
index 84fca0c..8b0350e 100755
--- a/flink_java8/docker-entrypoint.sh
+++ b/flink_java8/docker-entrypoint.sh
@@ -91,7 +91,20 @@ prepare_configuration() {
 
 maybe_enable_jemalloc() {
     if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
-        export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+        JEMALLOC_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so"
+        JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+        if [ -f "$JEMALLOC_PATH" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_PATH
+        elif [ -f "$JEMALLOC_FALLBACK" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_FALLBACK
+        else
+            if [ "$JEMALLOC_PATH" = "$JEMALLOC_FALLBACK" ]; then
+                MSG_PATH=$JEMALLOC_PATH
+            else
+                MSG_PATH="$JEMALLOC_PATH and $JEMALLOC_FALLBACK"
+            fi
+            echo "WARNING: attempted to load jemalloc from $MSG_PATH but the library couldn't be found. glibc will be used instead."
+        fi
     fi
 }
 
diff --git a/flink_latest/Dockerfile b/flink_latest/Dockerfile
index 1ba473e..2ec3428 100644
--- a/flink_latest/Dockerfile
+++ b/flink_latest/Dockerfile
@@ -16,12 +16,12 @@
 # limitations under the License.
 ###############################################################################
 
-FROM openjdk:11-jre
+FROM eclipse-temurin:11-jre-jammy
 
 # Install dependencies
 RUN set -ex; \
   apt-get update; \
-  apt-get -y install libsnappy1v5 gettext-base libjemalloc-dev; \
+  apt-get -y install gpg libsnappy1v5 gettext-base libjemalloc-dev; \
   rm -rf /var/lib/apt/lists/*
 
 # Grab gosu for easy step-down from root
@@ -44,9 +44,9 @@ RUN set -ex; \
   gosu nobody true
 
 # Configure Flink version
-ENV FLINK_TGZ_URL=https://www.apache.org/dyn/closer.cgi?action=download&filename=flink/flink-1.15.1/flink-1.15.1-bin-scala_2.12.tgz \
-    FLINK_ASC_URL=https://www.apache.org/dist/flink/flink-1.15.1/flink-1.15.1-bin-scala_2.12.tgz.asc \
-    GPG_KEY=7D660377995CA7A5AFEBA79A3EE012FEE982F098 \
+ENV FLINK_TGZ_URL=https://www.apache.org/dyn/closer.cgi?action=download&filename=flink/flink-1.15.2/flink-1.15.2-bin-scala_2.12.tgz \
+    FLINK_ASC_URL=https://www.apache.org/dist/flink/flink-1.15.2/flink-1.15.2-bin-scala_2.12.tgz.asc \
+    GPG_KEY=0F79F2AFB2351BC29678544591F9C1EC125FD8DB \
     CHECK_GPG=true
 
 # Prepare environment
@@ -79,7 +79,7 @@ RUN set -ex; \
   rm flink.tgz; \
   \
   chown -R flink:flink .; \
-
+  \
   # Replace default REST/RPC endpoint bind address to use the container's network interface \
   sed -i 's/rest.address: localhost/rest.address: 0.0.0.0/g' $FLINK_HOME/conf/flink-conf.yaml; \
   sed -i 's/rest.bind-address: localhost/rest.bind-address: 0.0.0.0/g' $FLINK_HOME/conf/flink-conf.yaml; \
diff --git a/flink_latest/docker-entrypoint.sh b/flink_latest/docker-entrypoint.sh
index 84fca0c..8b0350e 100755
--- a/flink_latest/docker-entrypoint.sh
+++ b/flink_latest/docker-entrypoint.sh
@@ -91,7 +91,20 @@ prepare_configuration() {
 
 maybe_enable_jemalloc() {
     if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then
-        export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+        JEMALLOC_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so"
+        JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+        if [ -f "$JEMALLOC_PATH" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_PATH
+        elif [ -f "$JEMALLOC_FALLBACK" ]; then
+            export LD_PRELOAD=$LD_PRELOAD:$JEMALLOC_FALLBACK
+        else
+            if [ "$JEMALLOC_PATH" = "$JEMALLOC_FALLBACK" ]; then
+                MSG_PATH=$JEMALLOC_PATH
+            else
+                MSG_PATH="$JEMALLOC_PATH and $JEMALLOC_FALLBACK"
+            fi
+            echo "WARNING: attempted to load jemalloc from $MSG_PATH but the library couldn't be found. glibc will be used instead."
+        fi
     fi
 }

Relevant Maintainers:

  • flink: @ApacheFlink

@tianon
Copy link
Member

tianon commented Sep 7, 2022

Good to go now? (or do you want to give it more time?)

@zentol
Copy link
Contributor Author

zentol commented Sep 7, 2022

@tianon Yes, we're good to go 👍

@tianon tianon merged commit cf32777 into docker-library:master Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants