2023-12-11 20:35:39 +08:00
|
|
|
FROM sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.1_12_1.9.7_3.3.1 as build
|
2023-08-15 14:10:13 +08:00
|
|
|
LABEL authors="A.C.Sukazyo Eyre"
|
|
|
|
|
|
|
|
COPY . /app/source/
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-12-11 20:35:39 +08:00
|
|
|
ARG DOCKER_BUILD=yes
|
2023-08-15 14:10:13 +08:00
|
|
|
RUN cd ./source \
|
2023-12-11 20:35:39 +08:00
|
|
|
&& sbt assembly \
|
2023-08-15 14:10:13 +08:00
|
|
|
&& cd .. \
|
2023-12-11 20:35:39 +08:00
|
|
|
&& cp ./source/target/morny-coeur-docker-build.jar ./morny-coeur.jar
|
2023-08-15 14:10:13 +08:00
|
|
|
#&& rm -r ./source \
|
|
|
|
#&& rm -r /root/.gradle \
|
|
|
|
|
|
|
|
|
2023-12-11 20:35:39 +08:00
|
|
|
FROM eclipse-temurin:21-jre
|
2023-08-15 14:10:13 +08:00
|
|
|
|
|
|
|
COPY --from=build /app/morny-coeur.jar /app/morny-coeur.jar
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
ENTRYPOINT ["java", "-jar", "morny-coeur.jar"]
|
|
|
|
CMD ["-q", "-v"]
|