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
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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[@]}"