Coeur-Morny-Cono/Dockerfile
Eyre_S 69a33933f5
add docker, update gradle wrapper
- added Dockerfile and simple example docker-compose.yml
- upgrade gradle wrapper: 7.5.1 -> 8.2.1
- tiny code refactor
2023-08-15 14:10:13 +08:00

22 lines
467 B
Docker

FROM eclipse-temurin:20-jdk as build
LABEL authors="A.C.Sukazyo Eyre"
COPY . /app/source/
WORKDIR /app
RUN cd ./source \
&& ./gradlew shadowJar -PdockerBuild \
&& cd .. \
&& cp ./source/build/libs/morny-coeur-docker-build.jar ./morny-coeur.jar
#&& rm -r ./source \
#&& rm -r /root/.gradle \
FROM eclipse-temurin:20-jre
COPY --from=build /app/morny-coeur.jar /app/morny-coeur.jar
WORKDIR /app
ENTRYPOINT ["java", "-jar", "morny-coeur.jar"]
CMD ["-q", "-v"]