/
Dockerfile
25 lines (21 loc) · 892 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM mesosphere/spark:1.6.1-6
# Infrastructure, install sbt
RUN echo "deb http://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list && \
apt-get update && \
apt-get install -y --force-yes sbt
# Only add build files and resolve dependencies first, so that
# they get cached independently and we do not have to do this for every recompile.
ADD build.sbt /iot-demo/build.sbt
ADD project /iot-demo/project
RUN cd /iot-demo && sbt -Dsbt.log.format=false update
# Build the assembly
COPY twitter /iot-demo/twitter
COPY streaming /iot-demo/streaming
COPY tweet-corpus /tweet-corpus
RUN cd /iot-demo && sbt -Dsbt.log.format=false assembly && \
cp -v */target/scala-2.10/*.jar .. && \
sbt clean clean-files && \
rm -rf /iot-demo ~/.ivy2 && \
apt-get remove --auto-remove -yf sbt && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /etc/hadoop