-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfileOneThread
36 lines (26 loc) · 1.18 KB
/
DockerfileOneThread
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
FROM maven:3.6.1-jdk-11-slim as DEPS
WORKDIR /app
COPY spe-ed-solver/core/pom.xml core/pom.xml
COPY spe-ed-solver/solver/pom.xml solver/pom.xml
COPY spe-ed-solver/simulation/pom.xml simulation/pom.xml
COPY spe-ed-solver/utility/pom.xml utility/pom.xml
COPY spe-ed-solver/visualisation/pom.xml visualisation/pom.xml
COPY spe-ed-solver/web-communication/pom.xml web-communication/pom.xml
COPY spe-ed-solver/pom.xml .
RUN mvn -B -e -C org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline
FROM maven:3.6.1-jdk-11-slim as BUILDER
WORKDIR /app
COPY --from=deps /root/.m2 /root/.m2
COPY --from=deps /app/ /app
COPY spe-ed-solver/core/src /app/core/src
COPY spe-ed-solver/solver/src /app/solver/src
COPY spe-ed-solver/simulation/src /app/simulation/src
COPY spe-ed-solver/utility/src /app/utility/src
COPY spe-ed-solver/visualisation/src /app/visualisation/src
COPY spe-ed-solver/web-communication/src /app/web-communication/src
RUN mvn -B -e clean install -DskipTests=true
FROM openjdk:11-jre-slim
WORKDIR /app
COPY --from=builder /app/core/target/core-1.0-jar-with-dependencies.jar .
ENTRYPOINT [ "java", "-jar", "/app/core-1.0-jar-with-dependencies.jar"]
CMD ["live", "-l=/", "-m=1"]