forked from Open-MBEE/exec-mmsri
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
18 lines (16 loc) · 774 Bytes
/
Copy pathDockerfile
File metadata and controls
18 lines (16 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM openjdk:15.0.1-jdk-slim as build
WORKDIR application
COPY . .
RUN ./gradlew --no-daemon bootJar
RUN find . -type f -name mms*.jar -not -iname '*javadoc*' -not -iname '*sources*' -exec cp '{}' 'app.jar' ';'
RUN java -Djarmode=layertools -jar app.jar extract
FROM openjdk:15.0.1-jdk-slim
WORKDIR application
RUN apt-get update && apt-get install -y procps
COPY --from=build application/dependencies/ ./
COPY --from=build application/spring-boot-loader/ ./
COPY --from=build application/snapshot-dependencies/ ./
COPY --from=build application/application/ ./
ENV JDK_JAVA_OPTIONS "-XX:MaxRAMPercentage=90.0 -XX:+PrintFlagsFinal -XX:+UseZGC"
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "org.springframework.boot.loader.JarLauncher"]
EXPOSE 8080