[GitHub] flink pull request #3086: Improve docker setup

2017-01-13 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/3086


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95411011
  
--- Diff: flink-contrib/docker-flink/docker-entrypoint.sh ---
@@ -28,6 +28,9 @@ if [ "$1" == "jobmanager" ]; then
 
 echo "config file: " && grep '^[^\n#]' $FLINK_HOME/conf/flink-conf.yaml
 $FLINK_HOME/bin/jobmanager.sh start cluster
+
+  # prevent script to exit
+  tail -f /dev/null
--- End diff --

I think the proper way to fix this, would be to call a non-daemonized 
startup script.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95411497
  
--- Diff: flink-contrib/docker-flink/docker-entrypoint.sh ---
@@ -36,9 +39,9 @@ elif [ "$1" == "taskmanager" ]; then
 echo "Starting Task Manager"
 echo "config file: " && grep '^[^\n#]' $FLINK_HOME/conf/flink-conf.yaml
 $FLINK_HOME/bin/taskmanager.sh start
+
+  # prevent script to exit
+  tail -f /dev/null
 else
 $@
--- End diff --

@greghogan Seems like a way to execute an arbitrary command passed inside 
the Docker container passed as an argument to `docker run `.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95410892
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,9 +22,9 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ENV FLINK_VERSION=1.1.1
-ENV HADOOP_VERSION=27
-ENV SCALA_VERSION=2.11
+ARG FLINK_VERSION=1.1.3
--- End diff --

`ARG` is only available in newer versions of Docker. If we want to maintain 
backwards-compatibility, we should adjust the README to state `docker build 
--env FLINK_VERSION=1.0.3`. As far as I know, we don't gain anything by using 
`ARG`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread greghogan
Github user greghogan commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95401803
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,9 +22,9 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ENV FLINK_VERSION=1.1.1
-ENV HADOOP_VERSION=27
-ENV SCALA_VERSION=2.11
+ARG FLINK_VERSION=1.1.3
--- End diff --

This does look to be broken. @mxm what was the issue with backwards 
compatibility?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread kaelumania
Github user kaelumania commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95384257
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,9 +22,9 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ENV FLINK_VERSION=1.1.1
-ENV HADOOP_VERSION=27
-ENV SCALA_VERSION=2.11
+ARG FLINK_VERSION=1.1.3
--- End diff --

Thus, this was basically a bug.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread kaelumania
Github user kaelumania commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95384182
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,9 +22,9 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ENV FLINK_VERSION=1.1.1
-ENV HADOOP_VERSION=27
-ENV SCALA_VERSION=2.11
+ARG FLINK_VERSION=1.1.3
--- End diff --

The `README` says I can specify a `FLINK_VERSION` using `docker build 
--build-arg FLINK_VERSION=1.0.3 flink`, but that is only possible marking the 
variable as `ARG` and not `ENV`, see 
https://docs.docker.com/engine/reference/builder/#/arg


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread kaelumania
Github user kaelumania commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95383742
  
--- Diff: flink-contrib/docker-flink/docker-entrypoint.sh ---
@@ -36,9 +39,9 @@ elif [ "$1" == "taskmanager" ]; then
 echo "Starting Task Manager"
 echo "config file: " && grep '^[^\n#]' $FLINK_HOME/conf/flink-conf.yaml
 $FLINK_HOME/bin/taskmanager.sh start
+
+  # prevent script to exit
+  tail -f /dev/null
 else
 $@
--- End diff --

When this image is used as a one-off container, e.g. I want to run 
`bin/flink list`, then this line would prevent the one-off container to exit 
correctly - instead it would hang forever.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread greghogan
Github user greghogan commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95382374
  
--- Diff: flink-contrib/docker-flink/docker-entrypoint.sh ---
@@ -36,9 +39,9 @@ elif [ "$1" == "taskmanager" ]; then
 echo "Starting Task Manager"
 echo "config file: " && grep '^[^\n#]' $FLINK_HOME/conf/flink-conf.yaml
 $FLINK_HOME/bin/taskmanager.sh start
+
+  # prevent script to exit
+  tail -f /dev/null
 else
 $@
--- End diff --

How is this used?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread greghogan
Github user greghogan commented on a diff in the pull request:

https://github.com/apache/flink/pull/3086#discussion_r95381935
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,9 +22,9 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ENV FLINK_VERSION=1.1.1
-ENV HADOOP_VERSION=27
-ENV SCALA_VERSION=2.11
+ARG FLINK_VERSION=1.1.3
--- End diff --

6e1e139 includes the note "replace ARG with ENV for 
backwards-compatibility".


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #3086: Improve docker setup

2017-01-10 Thread kaelumania
GitHub user kaelumania opened a pull request:

https://github.com/apache/flink/pull/3086

Improve docker setup

Improves the overall docker setup


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kaelumania/flink improve-docker-setup

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/3086.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3086


commit 1c82018de20a74d4d548bb6d95f0de453c6b5374
Author: Stephan Epping 
Date:   2017-01-10T11:11:27Z

Make build.sh executable

commit a11f6ab273c3a4c2472fdfd01612963d0146df44
Author: Stephan Epping 
Date:   2017-01-10T11:11:41Z

Fix Dockerfile using ARG instead of ENV

commit 1e1b274a6970e300a90bff3b5decf7d2153b9002
Author: Stephan Epping 
Date:   2017-01-10T11:12:34Z

Prevent exit only for job-/taskmanger shortcuts




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---