Skip to content

Commit

Permalink
[docker] improve Dockerfile
Browse files Browse the repository at this point in the history
- Make build.sh executable
- Fix Dockerfile using ARG instead of ENV
- Prevent exit only for job-/taskmanger shortcuts

This closes apache#3086.
  • Loading branch information
Stephan Epping authored and mxm committed Jan 13, 2017
1 parent 59b3be0 commit 8b1b4a1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions flink-contrib/docker-flink/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
ARG HADOOP_VERSION=27
ARG SCALA_VERSION=2.11

# Flink environment variables
ENV FLINK_INSTALL_PATH=/opt
Expand Down
Empty file modified flink-contrib/docker-flink/build.sh
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions flink-contrib/docker-flink/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
elif [ "$1" == "taskmanager" ]; then

sed -i -e "s/jobmanager.rpc.address: localhost/jobmanager.rpc.address: ${JOB_MANAGER_RPC_ADDRESS}/g" $FLINK_HOME/conf/flink-conf.yaml
Expand All @@ -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
$@
fi

# prevent script to exit
tail -f /dev/null

0 comments on commit 8b1b4a1

Please sign in to comment.