diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4266675 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +data/ +.idea/ +*.iml +*.iws +.sonar/ +.sonarlint/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5c02112 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM eclipse-temurin:17-jre AS builder +WORKDIR extracted +ADD ./target/*.jar app.jar +RUN java -Djarmode=layertools -jar app.jar extract + +FROM eclipse-temurin:17-jre +WORKDIR application +COPY --from=builder extracted/dependencies/ ./ +COPY --from=builder extracted/spring-boot-loader/ ./ +COPY --from=builder extracted/snapshot-dependencies/ ./ +COPY --from=builder extracted/application/ ./ + +EXPOSE 8080 + +ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"] \ No newline at end of file