You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by xt...@apache.org on 2020/12/23 05:23:24 UTC

[flink-docker] branch master updated: Update Dockerfiles for 1.12.0 release

This is an automated email from the ASF dual-hosted git repository.

xtsong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new 286de79  Update Dockerfiles for 1.12.0 release
286de79 is described below

commit 286de79870818644b7dc725b404b901fa9d49efd
Author: Xintong Song <to...@gmail.com>
AuthorDate: Wed Dec 23 12:47:54 2020 +0800

    Update Dockerfiles for 1.12.0 release
    
    Deprecate command `native-k8` and add preparation for pass-through mode.
    
    This is to address the comments in the following docker-library/official-images PR.
    https://github.com/docker-library/official-images/pull/9249
    
    This closes #50
---
 1.12/scala_2.11-java11-debian/docker-entrypoint.sh | 17 +++++++++++++++--
 1.12/scala_2.11-java8-debian/docker-entrypoint.sh  | 17 +++++++++++++++--
 1.12/scala_2.12-java11-debian/docker-entrypoint.sh | 17 +++++++++++++++--
 1.12/scala_2.12-java8-debian/docker-entrypoint.sh  | 17 +++++++++++++++--
 4 files changed, 60 insertions(+), 8 deletions(-)

diff --git a/1.12/scala_2.11-java11-debian/docker-entrypoint.sh b/1.12/scala_2.11-java11-debian/docker-entrypoint.sh
index 68db96b..a83e2a2 100755
--- a/1.12/scala_2.11-java11-debian/docker-entrypoint.sh
+++ b/1.12/scala_2.11-java11-debian/docker-entrypoint.sh
@@ -19,6 +19,7 @@
 ###############################################################################
 
 COMMAND_STANDALONE="standalone-job"
+# Deprecated, should be remove in Flink release 1.13
 COMMAND_NATIVE_KUBERNETES="native-k8s"
 COMMAND_HISTORY_SERVER="history-server"
 COMMAND_DISABLE_JEMALLOC="disable-jemalloc"
@@ -108,7 +109,7 @@ disable_jemalloc_env() {
 
 args=("$@")
 if [ "$1" = "help" ]; then
-    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_NATIVE_KUBERNETES}|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
+    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
     printf "    Or $(basename "$0") help\n\n"
     printf "By default, Flink image adopts jemalloc as default memory allocator and will disable jemalloc if option '${COMMAND_DISABLE_JEMALLOC}' given.\n"
     exit 0
@@ -171,4 +172,16 @@ elif [ "$1" = "$COMMAND_NATIVE_KUBERNETES" ]; then
     exec $(drop_privs_cmd) bash -c "${args[@]}"
 fi
 
-exec "$@"
+args=("${args[@]}")
+
+disable_jemalloc_env args
+
+copy_plugins_if_required
+
+# Set the Flink related environments
+export _FLINK_HOME_DETERMINED=true
+. $FLINK_HOME/bin/config.sh
+export FLINK_CLASSPATH="`constructFlinkClassPath`:$INTERNAL_HADOOP_CLASSPATHS"
+
+echo "Running command in pass-through mode: ${args[@]}"
+exec $(drop_privs_cmd) "${args[@]}"
diff --git a/1.12/scala_2.11-java8-debian/docker-entrypoint.sh b/1.12/scala_2.11-java8-debian/docker-entrypoint.sh
index 68db96b..a83e2a2 100755
--- a/1.12/scala_2.11-java8-debian/docker-entrypoint.sh
+++ b/1.12/scala_2.11-java8-debian/docker-entrypoint.sh
@@ -19,6 +19,7 @@
 ###############################################################################
 
 COMMAND_STANDALONE="standalone-job"
+# Deprecated, should be remove in Flink release 1.13
 COMMAND_NATIVE_KUBERNETES="native-k8s"
 COMMAND_HISTORY_SERVER="history-server"
 COMMAND_DISABLE_JEMALLOC="disable-jemalloc"
@@ -108,7 +109,7 @@ disable_jemalloc_env() {
 
 args=("$@")
 if [ "$1" = "help" ]; then
-    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_NATIVE_KUBERNETES}|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
+    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
     printf "    Or $(basename "$0") help\n\n"
     printf "By default, Flink image adopts jemalloc as default memory allocator and will disable jemalloc if option '${COMMAND_DISABLE_JEMALLOC}' given.\n"
     exit 0
@@ -171,4 +172,16 @@ elif [ "$1" = "$COMMAND_NATIVE_KUBERNETES" ]; then
     exec $(drop_privs_cmd) bash -c "${args[@]}"
 fi
 
-exec "$@"
+args=("${args[@]}")
+
+disable_jemalloc_env args
+
+copy_plugins_if_required
+
+# Set the Flink related environments
+export _FLINK_HOME_DETERMINED=true
+. $FLINK_HOME/bin/config.sh
+export FLINK_CLASSPATH="`constructFlinkClassPath`:$INTERNAL_HADOOP_CLASSPATHS"
+
+echo "Running command in pass-through mode: ${args[@]}"
+exec $(drop_privs_cmd) "${args[@]}"
diff --git a/1.12/scala_2.12-java11-debian/docker-entrypoint.sh b/1.12/scala_2.12-java11-debian/docker-entrypoint.sh
index 68db96b..a83e2a2 100755
--- a/1.12/scala_2.12-java11-debian/docker-entrypoint.sh
+++ b/1.12/scala_2.12-java11-debian/docker-entrypoint.sh
@@ -19,6 +19,7 @@
 ###############################################################################
 
 COMMAND_STANDALONE="standalone-job"
+# Deprecated, should be remove in Flink release 1.13
 COMMAND_NATIVE_KUBERNETES="native-k8s"
 COMMAND_HISTORY_SERVER="history-server"
 COMMAND_DISABLE_JEMALLOC="disable-jemalloc"
@@ -108,7 +109,7 @@ disable_jemalloc_env() {
 
 args=("$@")
 if [ "$1" = "help" ]; then
-    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_NATIVE_KUBERNETES}|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
+    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
     printf "    Or $(basename "$0") help\n\n"
     printf "By default, Flink image adopts jemalloc as default memory allocator and will disable jemalloc if option '${COMMAND_DISABLE_JEMALLOC}' given.\n"
     exit 0
@@ -171,4 +172,16 @@ elif [ "$1" = "$COMMAND_NATIVE_KUBERNETES" ]; then
     exec $(drop_privs_cmd) bash -c "${args[@]}"
 fi
 
-exec "$@"
+args=("${args[@]}")
+
+disable_jemalloc_env args
+
+copy_plugins_if_required
+
+# Set the Flink related environments
+export _FLINK_HOME_DETERMINED=true
+. $FLINK_HOME/bin/config.sh
+export FLINK_CLASSPATH="`constructFlinkClassPath`:$INTERNAL_HADOOP_CLASSPATHS"
+
+echo "Running command in pass-through mode: ${args[@]}"
+exec $(drop_privs_cmd) "${args[@]}"
diff --git a/1.12/scala_2.12-java8-debian/docker-entrypoint.sh b/1.12/scala_2.12-java8-debian/docker-entrypoint.sh
index 68db96b..a83e2a2 100755
--- a/1.12/scala_2.12-java8-debian/docker-entrypoint.sh
+++ b/1.12/scala_2.12-java8-debian/docker-entrypoint.sh
@@ -19,6 +19,7 @@
 ###############################################################################
 
 COMMAND_STANDALONE="standalone-job"
+# Deprecated, should be remove in Flink release 1.13
 COMMAND_NATIVE_KUBERNETES="native-k8s"
 COMMAND_HISTORY_SERVER="history-server"
 COMMAND_DISABLE_JEMALLOC="disable-jemalloc"
@@ -108,7 +109,7 @@ disable_jemalloc_env() {
 
 args=("$@")
 if [ "$1" = "help" ]; then
-    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_NATIVE_KUBERNETES}|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
+    printf "Usage: $(basename "$0") (jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_HISTORY_SERVER}) [${COMMAND_DISABLE_JEMALLOC}]\n"
     printf "    Or $(basename "$0") help\n\n"
     printf "By default, Flink image adopts jemalloc as default memory allocator and will disable jemalloc if option '${COMMAND_DISABLE_JEMALLOC}' given.\n"
     exit 0
@@ -171,4 +172,16 @@ elif [ "$1" = "$COMMAND_NATIVE_KUBERNETES" ]; then
     exec $(drop_privs_cmd) bash -c "${args[@]}"
 fi
 
-exec "$@"
+args=("${args[@]}")
+
+disable_jemalloc_env args
+
+copy_plugins_if_required
+
+# Set the Flink related environments
+export _FLINK_HOME_DETERMINED=true
+. $FLINK_HOME/bin/config.sh
+export FLINK_CLASSPATH="`constructFlinkClassPath`:$INTERNAL_HADOOP_CLASSPATHS"
+
+echo "Running command in pass-through mode: ${args[@]}"
+exec $(drop_privs_cmd) "${args[@]}"