forked from hmcts/ccd-case-document-am-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (15 loc) · 748 Bytes
/
Dockerfile
File metadata and controls
19 lines (15 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM adoptopenjdk:11-jre-hotspot as builder
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} application.jar
RUN java -Djarmode=layertools -jar application.jar extract
ARG APP_INSIGHTS_AGENT_VERSION=2.5.1
FROM hmctspublic.azurecr.io/base/java:openjdk-11-distroless-1.4
COPY lib/AI-Agent.xml /opt/app/
COPY --from=builder application/ /opt/app/
COPY --from=builder dependencies/ /opt/app/
# Add 'CMD true or RUN true' if consecutive COPY commands are failing in case (intermittently).
# See https://github.com/moby/moby/issues/37965#issuecomment-771526632
COPY --from=builder spring-boot-loader/ /opt/app/
COPY --from=builder snapshot-dependencies/ /opt/app/
EXPOSE 4455
ENTRYPOINT ["/usr/bin/java", "org.springframework.boot.loader.JarLauncher"]