flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject flink git commit: [FLINK-3155] Update docker flink container to the latest release
Date Wed, 17 Aug 2016 13:50:09 GMT
Repository: flink
Updated Branches:
  refs/heads/master c894896a4 -> 889c63e56


[FLINK-3155] Update docker flink container to the latest release

[FLINK-3155] Make docker image execute as non-root user (l:flink)

[FLINK-3155] Change default FLINK_HOME from /usr/local/flink to /opt/flink

[FLINK-3155] Make install path configuragle, simplify mirror based download

[FLINK-3155] Upgrade default docker version to 1.1.1

This closes #2340


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/889c63e5
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/889c63e5
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/889c63e5

Branch: refs/heads/master
Commit: 889c63e569fc0623276aa604ec5e16236aff8003
Parents: c894896
Author: Ismaël Mejía <iemejia@gmail.com>
Authored: Sun Aug 7 12:57:48 2016 +0200
Committer: Maximilian Michels <mxm@apache.org>
Committed: Wed Aug 17 15:49:05 2016 +0200

----------------------------------------------------------------------
 flink-contrib/docker-flink/Dockerfile         | 24 ++++++++++++++--------
 flink-contrib/docker-flink/docker-compose.yml |  3 +--
 2 files changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/889c63e5/flink-contrib/docker-flink/Dockerfile
----------------------------------------------------------------------
diff --git a/flink-contrib/docker-flink/Dockerfile b/flink-contrib/docker-flink/Dockerfile
index 26aa9c0..d5a4432 100644
--- a/flink-contrib/docker-flink/Dockerfile
+++ b/flink-contrib/docker-flink/Dockerfile
@@ -22,25 +22,31 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.1
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ARG FLINK_INSTALL_PATH=/opt
+ENV FLINK_HOME $FLINK_INSTALL_PATH/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p $FLINK_INSTALL_PATH && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print $2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
| \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g"
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?preferred\=true)flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
| \
+  tar xvz -C $FLINK_INSTALL_PATH && \
+  ln -s $FLINK_INSTALL_PATH/flink-$FLINK_VERSION $FLINK_HOME && \
+  addgroup -S flink && adduser -D -S -H -G flink -h $FLINK_HOME flink &&
\
+  chown -R flink:flink $FLINK_INSTALL_PATH/flink-$FLINK_VERSION && \
+  chown -h flink:flink $FLINK_HOME && \
+  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g"
$FLINK_HOME/bin/flink-daemon.sh && \
   apk del build-dependencies && \
   rm -rf /var/cache/apk/*
 
-ENV FLINK_HOME /usr/local/flink
-ENV PATH $PATH:$FLINK_HOME/bin
-
 # Configure container
+USER flink
 ADD docker-entrypoint.sh $FLINK_HOME/bin/
 ENTRYPOINT ["docker-entrypoint.sh"]
 CMD ["sh", "-c"]

http://git-wip-us.apache.org/repos/asf/flink/blob/889c63e5/flink-contrib/docker-flink/docker-compose.yml
----------------------------------------------------------------------
diff --git a/flink-contrib/docker-flink/docker-compose.yml b/flink-contrib/docker-flink/docker-compose.yml
index 5299838..08956c6 100644
--- a/flink-contrib/docker-flink/docker-compose.yml
+++ b/flink-contrib/docker-flink/docker-compose.yml
@@ -24,7 +24,7 @@ services:
       - "48081:8081"
     command: jobmanager
     volumes:
-      - /usr/local/flink/conf
+      - /opt/flink/conf
 
   taskmanager:
     image: flink
@@ -33,4 +33,3 @@ services:
     command: taskmanager
     volumes_from:
       - jobmanager:ro
-


Mime
View raw message