[GitHub] flink issue #3086: Improve docker setup
Github user kaelumania commented on the issue: https://github.com/apache/flink/pull/3086 @mxm thanks :) needs there anything to be done, until this PR can be merged? --- 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 issue #3086: Improve docker setup
Github user kaelumania commented on the issue: https://github.com/apache/flink/pull/3086 @mxn neither `docker build` nor `docker compose build` support setting environment variables from outside during the build. Further as the `docker-compose` documentation states > Note: If your service specifies a build option, variables defined in environment will not be automatically visible during the build. Use the args sub-option of build to define build-time environment variables. It is only possible to give arguments to the build step of `docker-compose` using the `--build-args` option, which can be interpolated with `${my_env_var}`. But still requires the `Dockerfile` to use `ARG`. Further I question the Docker version compatibility. First, flink could provide an automated build on Docker Hub. Second, one could provide a `Dockerfile.legacy` aswell. --- 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 issue #3086: Improve docker setup
Github user kaelumania commented on the issue: https://github.com/apache/flink/pull/3086 @mxn One drawback using `ENV` might be with docker-compose, see https://docs.docker.com/compose/compose-file/#/args which states > You can omit the value when specifying a build argument, in which case its value at build time is the value in the environment where Compose is running. > Note: If your service specifies a build option, variables defined in environment will not be automatically visible during the build. Use the args sub-option of build to define build-time environment variables. On the other hand the Dockerfile reference says (https://docs.docker.com/engine/reference/builder/#/arg) > Unlike an ARG instruction, ENV values are always persisted in the built image. Maybe something like this can be used to support both ``` 1 FROM ubuntu 2 ARG CONT_IMG_VER 3 ENV CONT_IMG_VER ${CONT_IMG_VER:-v1.0.0} 4 RUN echo $CONT_IMG_VER ``` --- 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 issue #3086: Improve docker setup
Github user kaelumania commented on the issue: https://github.com/apache/flink/pull/3086 I am not sure, why the build fails as I am not deeply familiar with the Java/Scala world. --- 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 issue #3086: Improve docker setup
Github user kaelumania commented on the issue: https://github.com/apache/flink/pull/3086 @greghogan No, I didn't create a Ticket (sorry, I was not sure if this change justifies a Ticket). But I would love to see a Ticket about an automated build at DockerHub for Flink. --- 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
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
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
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
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 <stephan.epp...@zweitag.de> Date: 2017-01-10T11:11:27Z Make build.sh executable commit a11f6ab273c3a4c2472fdfd01612963d0146df44 Author: Stephan Epping <stephan.epp...@zweitag.de> Date: 2017-01-10T11:11:41Z Fix Dockerfile using ARG instead of ENV commit 1e1b274a6970e300a90bff3b5decf7d2153b9002 Author: Stephan Epping <stephan.epp...@zweitag.de> 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. ---