Coeur-Morny-Cono/Dockerfile

26 lines
468 B
Docker
Raw Normal View History

2024-11-03 15:11:29 +08:00
FROM gradle:8.8-jdk21 AS build-base
2024-11-03 15:11:29 +08:00
WORKDIR /build
COPY ./build.gradle ./settings.gradle ./gradle.properties /build/
RUN gradle buildEnvironment
RUN gradle dependencies
2024-11-03 15:11:29 +08:00
FROM build-base AS build
2024-11-03 15:11:29 +08:00
WORKDIR /build
2024-11-03 15:11:29 +08:00
COPY . /build/
RUN gradle shadowJar -PdockerBuild
FROM eclipse-temurin:20-jre AS app
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
ENTRYPOINT ["java", "-jar", "morny-coeur.jar"]
CMD ["-q", "-v"]