2024-07-03 13:55:34 +00:00
|
|
|
FROM maven:3.9.8-eclipse-temurin-21 as builder
|
2022-10-03 07:59:21 +00:00
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . /src
|
|
|
|
RUN mvn clean package
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
RUN cp /src/target/bousole-pluss-backend*.jar bousole-pluss-backend.jar
|
|
|
|
RUN java -Djarmode=layertools -jar bousole-pluss-backend.jar extract
|
|
|
|
|
2024-07-03 13:55:34 +00:00
|
|
|
FROM eclipse-temurin:21-jre-alpine
|
2022-10-03 07:59:21 +00:00
|
|
|
EXPOSE 8080
|
|
|
|
|
2022-10-13 16:15:20 +00:00
|
|
|
USER root
|
2022-10-03 07:59:21 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
2022-10-13 16:15:20 +00:00
|
|
|
COPY --from=builder /app/dependencies/ ./
|
|
|
|
COPY --from=builder /app/snapshot-dependencies/ ./
|
|
|
|
COPY --from=builder /app/spring-boot-loader/ ./
|
|
|
|
COPY --from=builder /app/application/ ./
|
2024-07-03 13:55:34 +00:00
|
|
|
ENTRYPOINT java org.springframework.boot.loader.launch.JarLauncher
|