forked from LREN-CHUV/woken-messages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (22 loc) · 862 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
# Pull base image
FROM hbpmip/scala-base-build:1.2.8-0 as scala-build-env
ARG BINTRAY_USER
ARG BINTRAY_PASS
ENV BINTRAY_USER=$BINTRAY_USER \
BINTRAY_PASS=$BINTRAY_PASS
# First caching layer: build.sbt and sbt configuration
COPY build.sbt /build/
RUN mkdir -p /build/project/
COPY project/build.properties project/plugins.sbt project/.gitignore /build/project/
# Run sbt on an empty project and force it to download most of its dependencies to fill the cache
RUN sbt -mem 1500 compile
# Second caching layer: project sources
COPY src/ /build/src/
COPY .git/ /build/.git/
COPY .circleci/ /build/.circleci/
COPY .*.cfg .*ignore .*.yaml .*.conf *.md *.sh *.yml *.json Dockerfile LICENSE /build/
RUN /check-sources.sh
LABEL build=true
RUN sbt -mem 1500 test +package
# Check again the sources to detect code that needs reformatting
RUN /check-sources.sh