Skip to content

Commit

Permalink
[FLINK-4209] Remove supervisord dependency for the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
iemejia authored and aljoscha committed Jul 18, 2016
1 parent 7d53902 commit bd8d7f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 34 deletions.
6 changes: 2 additions & 4 deletions flink-contrib/docker-flink/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
FROM java:8-jre-alpine

# Install requirements
RUN apk add --no-cache bash snappy supervisor

# Configure supervisor
ADD supervisor.conf /etc/supervisor/
RUN apk add --no-cache bash snappy

# Configure Flink version
ARG FLINK_VERSION=1.0.3
Expand All @@ -36,6 +33,7 @@ RUN set -x && \
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 && \
apk del build-dependencies && \
rm -rf /var/cache/apk/*

Expand Down
5 changes: 2 additions & 3 deletions flink-contrib/docker-flink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ https://docs.docker.com/compose/install/

# Build

Images are based on the official Java Alpine (OpenJDK 8) image and run
supervisord to stay alive when running containers. If you want to build the
flink image run:
Images are based on the official Java Alpine (OpenJDK 8) image. If you want to
build the flink image run:

sh build.sh

Expand Down
8 changes: 2 additions & 6 deletions flink-contrib/docker-flink/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ if [ "$1" = "jobmanager" ]; then
echo "Starting Job Manager"
sed -i -e "s/jobmanager.rpc.address: localhost/jobmanager.rpc.address: `hostname -f`/g" $FLINK_HOME/conf/flink-conf.yaml
sed -i -e "s/taskmanager.numberOfTaskSlots: 1/taskmanager.numberOfTaskSlots: `grep -c ^processor /proc/cpuinfo`/g" $FLINK_HOME/conf/flink-conf.yaml
$FLINK_HOME/bin/jobmanager.sh start cluster
echo "config file: " && grep '^[^\n#]' $FLINK_HOME/conf/flink-conf.yaml
supervisord -c /etc/supervisor/supervisor.conf

$FLINK_HOME/bin/jobmanager.sh start cluster
elif [ "$1" = "taskmanager" ]; then
echo "Starting Task Manager"
$FLINK_HOME/bin/taskmanager.sh start
echo "config file: " && grep '^[^\n#]' $FLINK_HOME/conf/flink-conf.yaml
supervisord -c /etc/supervisor/supervisor.conf

$FLINK_HOME/bin/taskmanager.sh start
else
$@
fi
21 changes: 0 additions & 21 deletions flink-contrib/docker-flink/supervisor.conf

This file was deleted.

0 comments on commit bd8d7f5

Please sign in to comment.