You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/13 16:03:24 UTC

[GitHub] [flink] rmetzger commented on a change in pull request #14630: [FLINK-20915][docker] Move docker entrypoint to distribution

rmetzger commented on a change in pull request #14630:
URL: https://github.com/apache/flink/pull/14630#discussion_r556603593



##########
File path: flink-end-to-end-tests/test-scripts/common_docker.sh
##########
@@ -48,7 +48,7 @@ function build_image() {
     local server_pid=$!
 
     echo "Preparing Dockeriles"

Review comment:
       ```suggestion
       echo "Preparing Dockerfiles"
   ```

##########
File path: flink-dist/src/main/flink-bin/bin/docker-entrypoint.sh
##########
@@ -0,0 +1,161 @@
+#!/usr/bin/env bash
+
+###############################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+COMMAND_STANDALONE="standalone-job"
+# Deprecated, should be remove in Flink release 1.13

Review comment:
       ```suggestion
   # Deprecated, should be removed in Flink release 1.13
   ```

##########
File path: flink-dist/src/main/flink-bin/bin/docker-entrypoint.sh
##########
@@ -0,0 +1,161 @@
+#!/usr/bin/env bash
+
+###############################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+COMMAND_STANDALONE="standalone-job"
+# Deprecated, should be remove in Flink release 1.13

Review comment:
       This PR is against master, which will eventually become release 1.13?

##########
File path: flink-dist/src/main/flink-bin/bin/docker-entrypoint.sh
##########
@@ -0,0 +1,161 @@
+#!/usr/bin/env bash
+
+###############################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+

Review comment:
       Maybe add a comment why the docker-entrypoint is located here.

##########
File path: flink-dist/src/main/flink-bin/bin/docker-entrypoint.sh
##########
@@ -0,0 +1,161 @@
+#!/usr/bin/env bash
+
+###############################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+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"
+
+args=("$@")
+echo "${args[@]}"
+
+bin=`dirname "$0"`
+bin=`cd "$bin"; pwd`
+
+# FLINK_HOME is set by the docker image

Review comment:
       Does it make sense to check if the variable is set?
   
   If not, return an error that the variable is not set, and that the script should not be called directly?

##########
File path: flink-dist/src/main/flink-bin/bin/docker-entrypoint.sh
##########
@@ -0,0 +1,161 @@
+#!/usr/bin/env bash

Review comment:
       The script shows up in `build-target/bin`. If we keep it there, we need to add a message that it shall not be used manually.
   
   Maybe, it makes sense to move the script to `opt/docker/docker-entrypoint.sh` to not further pollute `bin/`? (This is really just a thought for discussion)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org