-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasuna-scala-base
54 lines (44 loc) · 1.41 KB
/
asuna-scala-base
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
FROM openjdk:8u171
ARG az_sp_credentials
# Install base packages
RUN \
apt-get update && \
apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
ENV SCALA_VERSION 2.12.4
ENV SBT_VERSION 0.13.17
# Scala expects this file
RUN touch /usr/lib/jvm/java-8-openjdk-amd64/release
# Install scala
RUN \
curl -fsL https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz | tar xfz - -C /root/ && \
echo >> /root/.bashrc && \
echo "export PATH=~/scala-$SCALA_VERSION/bin:$PATH" >> /root/.bashrc
# Install sbt
RUN \
curl -L -o sbt-$SBT_VERSION.deb https://dl.bintray.com/sbt/debian/sbt-$SBT_VERSION.deb && \
dpkg -i sbt-$SBT_VERSION.deb && \
rm sbt-$SBT_VERSION.deb && \
apt-get update && \
apt-get -y install sbt && \
sbt sbtVersion
# Configure sbt s3 resolver
RUN \
mkdir -p /root/.sbt/0.13/plugins && \
echo 'addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.16.0")' >> /root/.sbt/0.13/plugins/plugins.sbt
# Install docker
RUN \
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get -y install docker-ce
# Define working directory
WORKDIR /asuna
# Copy Azure Service Principal Credentials file
COPY $az_sp_credentials /asuna/az-sp-credentials