-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (22 loc) · 845 Bytes
/
Dockerfile
File metadata and controls
26 lines (22 loc) · 845 Bytes
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
FROM eclipse-temurin:17-jre as builder
WORKDIR application
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} formplayer.jar
RUN java -Djarmode=layertools -jar formplayer.jar extract
FROM eclipse-temurin:17-jre
LABEL maintainer="Dimagi <devops@dimagi.com>"
WORKDIR application
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
# required to provide `route` command for custom entrypoint
net-tools; \
rm -rf /var/lib/apt/lists/*
COPY --from=builder application/dependencies/ ./
COPY --from=builder application/snapshot-dependencies/ ./
COPY --from=builder application/spring-boot-loader/ ./
COPY --from=builder application/application/ ./
COPY scripts/docker_entrypoint.sh /entrypoint
RUN chmod +x /entrypoint
ENTRYPOINT ["/entrypoint"]
CMD ["java", "org.springframework.boot.loader.JarLauncher"]