Skip to content

Commit

Permalink
[FLINK-4209] Separate build dependencies in the docker image and remo…
Browse files Browse the repository at this point in the history
…ve them once it is ready
  • Loading branch information
iemejia authored and aljoscha committed Jul 18, 2016
1 parent e1e8c2d commit a9a75ce
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions flink-contrib/docker-flink/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,25 @@
FROM java:8-jre-alpine

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

# Configure supervisor
ADD supervisor.conf /etc/supervisor/

# Install Flink
# Configure Flink version
ARG FLINK_VERSION=1.0.3
ARG HADOOP_VERSION=27
ARG SCALA_VERSION=2.11

RUN 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/
RUN ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink
# Install build dependencies and flink
RUN 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 && \
apk del build-dependencies && \
rm -rf /var/cache/apk/*

ENV FLINK_HOME /usr/local/flink
ENV PATH $PATH:$FLINK_HOME/bin

Expand Down

0 comments on commit a9a75ce

Please sign in to comment.