-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDockerfile
57 lines (45 loc) · 2.09 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM alpine:latest
MAINTAINER UnderstandLing <contact@understandling.com>
# our versions of the tools
ENV SBT_VERSION 0.13.12
ENV SCALA_VERSION 2.11.8
ENV ACTIVATOR_VERSION 1.3.10
ENV TUKTU_VERSION 1.3
# general stuff
USER root
RUN apk update && apk upgrade
RUN apk update && apk add ca-certificates wget && update-ca-certificates
WORKDIR /tmp
# install openjdk8
RUN apk add openjdk8
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV PATH $JAVA_HOME/bin:$PATH
# install sbt
RUN apk add curl
ENV SBT_HOME /usr/local/sbt
RUN curl -sL "http://dl.bintray.com/sbt/native-packages/sbt/$SBT_VERSION/sbt-$SBT_VERSION.tgz" | gunzip | tar -x -C /usr/local && echo -ne "- with sbt $SBT_VERSION\n" >> /root/.built
ENV PATH $SBT_HOME/bin:$PATH
# install scala
ENV SCALA_HOME /usr/share/scala
RUN apk add --no-cache --virtual=.build-dependencies wget ca-certificates && apk add --no-cache bash && cd "/tmp" && wget "https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz" && \
tar xzf "scala-$SCALA_VERSION.tgz" && mkdir "$SCALA_HOME" && rm "/tmp/scala-$SCALA_VERSION/bin/"*.bat && mv "/tmp/scala-$SCALA_VERSION/bin" "/tmp/scala-$SCALA_VERSION/lib" "$SCALA_HOME" && \
ln -s "$SCALA_HOME/bin/"* "/usr/bin/" && apk del .build-dependencies
ENV PATH $SCALA_HOME/bin:$PATH
# download and install activator
RUN wget "http://downloads.typesafe.com/typesafe-activator/$ACTIVATOR_VERSION/typesafe-activator-$ACTIVATOR_VERSION-minimal.zip"
RUN unzip typesafe-activator-$ACTIVATOR_VERSION-minimal.zip
RUN mv activator-$ACTIVATOR_VERSION-minimal /usr/share/activator
ENV PATH /usr/share/activator/bin:$PATH
# AKKA communication and Tuktu UI
EXPOSE 2552
EXPOSE 9000
# download our application distribution, extract it and move to the correct spot
RUN wget "https://github.com/UnderstandLingBV/Tuktu/releases/download/$TUKTU_VERSION/tuktu-$TUKTU_VERSION.zip"
RUN unzip tuktu-$TUKTU_VERSION.zip
RUN mv tuktu-$TUKTU_VERSION /usr/share/tuktu-$TUKTU_VERSION
# change working dir to packaged version
WORKDIR /usr/share/tuktu-$TUKTU_VERSION
# clean up
RUN rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
# and.. go!
CMD ["./bin/tuktu"]