forked from konturio/disaster-ninja-be
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
17 lines (16 loc) · 703 Bytes
/
Dockerfile
File metadata and controls
17 lines (16 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM openjdk:17-alpine as builder
WORKDIR /application
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} application.jar
RUN java -Djarmode=layertools -jar application.jar extract
FROM openjdk:17-alpine
RUN addgroup -S application && adduser -S application -G application
USER application:application
WORKDIR application
EXPOSE 8627
COPY --from=builder /application/dependencies ./
COPY --from=builder /application/spring-boot-loader ./
COPY build/opentelemetry/opentelemetry-javaagent.jar /opentelemetry/opentelemetry-javaagent.jar
COPY --from=builder /application/snapshot-dependencies ./
COPY --from=builder /application/application ./
ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]