mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-23 19:47:38 +08:00
changed Dockerfile
This commit is contained in:
parent
2611ad702f
commit
5f08408ccf
@ -1,17 +1,23 @@
|
|||||||
|
# Ignore everything
|
||||||
|
*
|
||||||
|
|
||||||
# IDE
|
# Allow files and directories
|
||||||
.idea/
|
!/.git
|
||||||
.vscode/
|
!/src
|
||||||
.gradle/
|
!/.editorconfig
|
||||||
.settings/
|
!/.gitattributes
|
||||||
|
!/.gitignore
|
||||||
|
!/build.gradle
|
||||||
|
!/gradle.properties
|
||||||
|
!/gradlew
|
||||||
|
!/gradlew.bat
|
||||||
|
!/morny-github-social-preview-card@0.75x.png
|
||||||
|
!/README.md
|
||||||
|
!/settings.gradle
|
||||||
|
|
||||||
#build
|
# Ignore unnecessary files inside allowed directories
|
||||||
/build/
|
# This should go after the allowed directories
|
||||||
/bin/
|
**/*~
|
||||||
.metals/
|
**/*.log
|
||||||
.bloop/
|
**/.DS_Store
|
||||||
.project
|
**/Thumbs.db
|
||||||
lcoal.properties
|
|
||||||
|
|
||||||
# debug dir
|
|
||||||
/run/
|
|
||||||
|
34
Dockerfile
34
Dockerfile
@ -1,21 +1,25 @@
|
|||||||
FROM eclipse-temurin:20-jdk as build
|
FROM gradle:8.8-jdk21 AS build-base
|
||||||
LABEL authors="A.C.Sukazyo Eyre"
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
COPY ./build.gradle ./settings.gradle ./gradle.properties /build/
|
||||||
|
|
||||||
|
RUN gradle buildEnvironment
|
||||||
|
RUN gradle dependencies
|
||||||
|
|
||||||
|
FROM build-base AS build
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
COPY . /build/
|
||||||
|
|
||||||
|
RUN gradle shadowJar -PdockerBuild
|
||||||
|
|
||||||
|
FROM eclipse-temurin:20-jre AS app
|
||||||
|
|
||||||
COPY . /app/source/
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN cd ./source \
|
COPY --from=build /build/build/libs/morny-coeur-docker-build.jar /app/morny-coeur.jar
|
||||||
&& ./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"]
|
ENTRYPOINT ["java", "-jar", "morny-coeur.jar"]
|
||||||
CMD ["-q", "-v"]
|
CMD ["-q", "-v"]
|
||||||
|
Loading…
Reference in New Issue
Block a user