-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 1021 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
26
27
28
29
30
31
32
# Pull base image
# Based on https://github.com/spikerlabs/scala-sbt/blob/master/.circleci/config.yml
FROM openjdk:8-jre-alpine
ARG SCALA_VERSION
ARG SBT_VERSION
ENV SCALA_VERSION ${SCALA_VERSION:-2.12.6}
ENV SBT_VERSION ${SBT_VERSION:-1.2.1}
RUN \
apk add --no-cache bash && \
apk add --no-cache curl && \
apk add --no-cache openssh && \
apk add --no-cache git && \
apk add --no-cache docker
RUN \
echo "$SCALA_VERSION $SBT_VERSION" && \
mkdir -p /usr/lib/jvm/java-1.8-openjdk/jre && \
touch /usr/lib/jvm/java-1.8-openjdk/jre/release && \
curl -fsL http://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz | tar xfz - -C /usr/local && \
ln -s /usr/local/scala-$SCALA_VERSION/bin/* /usr/local/bin/ && \
scala -version && \
scalac -version
RUN \
curl -fsL https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz | tar xfz - -C /usr/local && \
ln -s /usr/local/sbt/bin/* /usr/local/bin/ && \
sbt sbtVersion
COPY .ivy2/.credentials /root/.ivy2/