diff options
author | terminaldweller <thabogre@gmail.com> | 2022-02-26 17:22:03 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-02-26 17:22:03 +0000 |
commit | c47bef40cc3b01d0dac1941b9be9ce7229d40af9 (patch) | |
tree | f4199af340b3a1896ce2c9a1951c5e4c8690762e /Dockerfile | |
parent | added a fatjar task (diff) | |
download | mdrtl-c47bef40cc3b01d0dac1941b9be9ce7229d40af9.tar.gz mdrtl-c47bef40cc3b01d0dac1941b9be9ce7229d40af9.zip |
a working dockerfile
Diffstat (limited to '')
-rw-r--r-- | Dockerfile | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1,4 +1,13 @@ -FROM openjdk:11-jdk-alpine -ARG JAR_FILE=./build/libs/src.jar -COPY ${JAR_FILE} src.jar -ENTRYPOINT ["java", "-jar", "/src.jar"] +FROM gradle:7.3.3-jdk11-alpine AS builder +WORKDIR /home/springapp +COPY --chown=gradle:gradle ./gradlew /home/springapp/ +COPY --chown=gradle:gradle ./settings.gradle.kts /home/springapp/ +COPY --chown=gradle:gradle ./build.gradle.kts /home/springapp/ +RUN gradle wrapper --no-daemon +COPY --chown=gradle:gradle ./src /home/springapp/src +RUN gradle bootJar --no-daemon + +FROM eclipse-temurin:11-jre-alpine +WORKDIR /springapp +COPY --from=builder /home/springapp/build/libs/src.jar ./src.jar +ENTRYPOINT ["java", "-jar", "/springapp/src.jar"] |