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
|
||||
.idea/
|
||||
.vscode/
|
||||
.gradle/
|
||||
.settings/
|
||||
# Allow files and directories
|
||||
!/.git
|
||||
!/src
|
||||
!/.editorconfig
|
||||
!/.gitattributes
|
||||
!/.gitignore
|
||||
!/build.gradle
|
||||
!/gradle.properties
|
||||
!/gradlew
|
||||
!/gradlew.bat
|
||||
!/morny-github-social-preview-card@0.75x.png
|
||||
!/README.md
|
||||
!/settings.gradle
|
||||
|
||||
#build
|
||||
/build/
|
||||
/bin/
|
||||
.metals/
|
||||
.bloop/
|
||||
.project
|
||||
lcoal.properties
|
||||
|
||||
# debug dir
|
||||
/run/
|
||||
# Ignore unnecessary files inside allowed directories
|
||||
# This should go after the allowed directories
|
||||
**/*~
|
||||
**/*.log
|
||||
**/.DS_Store
|
||||
**/Thumbs.db
|
||||
|
34
Dockerfile
34
Dockerfile
@ -1,21 +1,25 @@
|
||||
FROM eclipse-temurin:20-jdk as build
|
||||
LABEL authors="A.C.Sukazyo Eyre"
|
||||
FROM gradle:8.8-jdk21 AS build-base
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
COPY --from=build /build/build/libs/morny-coeur-docker-build.jar /app/morny-coeur.jar
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "morny-coeur.jar"]
|
||||
CMD ["-q", "-v"]
|
||||
|
Loading…
Reference in New Issue
Block a user