2024-11-03 15:11:29 +08:00
|
|
|
FROM gradle:8.8-jdk21 AS build-base
|
2023-08-15 14:10:13 +08:00
|
|
|
|
2024-11-03 15:11:29 +08:00
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
COPY ./build.gradle ./settings.gradle ./gradle.properties /build/
|
|
|
|
|
|
|
|
RUN gradle buildEnvironment
|
|
|
|
RUN gradle dependencies
|
2023-08-15 14:10:13 +08:00
|
|
|
|
2024-11-03 15:11:29 +08:00
|
|
|
FROM build-base AS build
|
2023-08-15 14:10:13 +08:00
|
|
|
|
2024-11-03 15:11:29 +08:00
|
|
|
WORKDIR /build
|
2023-08-15 14:10:13 +08:00
|
|
|
|
2024-11-03 15:11:29 +08:00
|
|
|
COPY . /build/
|
|
|
|
|
|
|
|
RUN gradle shadowJar -PdockerBuild
|
|
|
|
|
|
|
|
FROM eclipse-temurin:20-jre AS app
|
2023-08-15 14:10:13 +08:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2024-11-03 15:11:29 +08:00
|
|
|
COPY --from=build /build/build/libs/morny-coeur-docker-build.jar /app/morny-coeur.jar
|
|
|
|
|
2023-08-15 14:10:13 +08:00
|
|
|
ENTRYPOINT ["java", "-jar", "morny-coeur.jar"]
|
|
|
|
CMD ["-q", "-v"]
|