-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
31 lines (24 loc) · 809 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
FROM 1science/sbt:0.13.8-oracle-jre-8
MAINTAINER Kevin Chabreck
# PaintChat image based on Oracle Java 8 and SBT 0.13.9
# get required sbt version
COPY project/build.properties project/build.properties
RUN sbt update
# build compiler-interface for scala 12.4
RUN echo 'scalaVersion := "2.12.4"' > build.sbt && \
mkdir -p src/main/scala && \
touch src/main/scala/tmp.scala && \
sbt compile && \
rm -rf src build.sbt
# download dependencies
COPY build.sbt build.sbt
RUN sbt compile
# build project once without config file
COPY src/main/resources/www/ src/main/resources/www/
COPY src/main/scala/ src/main/scala/
RUN sbt compile
# rebuild with config
COPY src/main/resources/application.conf src/main/resources/application.conf
RUN sbt compile
# run PaintChat on entry
CMD ["sbt", "run"]