docker-debug
/
Dockerfile
19 строк · 630.0 Байт
1FROM eclipse-temurin:21-jdk-alpine as builder
2WORKDIR application
3ARG JAR_FILE=build/libs/application.jar
4COPY ${JAR_FILE} application.jar
5RUN java -Djarmode=layertools -jar application.jar extract
6
7FROM eclipse-temurin:21-jdk-alpine
8ENV PORT=8080
9ENV JAVA_XMS=128m
10ENV JAVA_XMX=256m
11ENV JAVA_OPTS=""
12WORKDIR application
13COPY --from=builder application/spring-boot-loader/ ./
14COPY --from=builder application/dependencies/ ./
15COPY --from=builder application/snapshot-dependencies/ ./
16COPY --from=builder application/application/ ./
17EXPOSE ${PORT:-8080}
18
19ENTRYPOINT java $JAVA_OPTS org.springframework.boot.loader.launch.JarLauncher