-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
37 lines (28 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM openjdk:17-jdk-alpine as build
#FROM adoptopenjdk/openjdk12-openj9:latest as build
WORKDIR /workspace/app
COPY gradlew .
COPY gradle gradle
COPY gradle.properties gradle.properties
COPY version.gradle .
COPY settings.gradle .
COPY build.gradle .
RUN ./gradlew dependencies
#RUN ./gradlew --no-daemon shadowJar
COPY src src
RUN ./gradlew bootJar -x test
RUN mkdir ./libs
RUN mkdir -p build/dependency && (cd build/dependency; jar -xf ../libs/*.jar)
#FROM adoptopenjdk/openjdk12-openj9:latest
FROM openjdk:17-jdk-alpine
RUN apk add --no-cache tzdata
ENV TZ Europe/Brussels
VOLUME /tmp
ARG DEPENDENCY=/workspace/app/build/dependency
COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY --from=build ${DEPENDENCY}/META-INF /app/META-INF
COPY --from=build ${DEPENDENCY}/BOOT-INF/classes /app
ENTRYPOINT ["java","-XX:MaxRAMPercentage=80.0","-cp","app:app/lib/*","com.ulegalize.lawfirm.UlegalizeLawfirmApplication"]
#COPY build/libs/*.jar lawfirm.jar
#ENV LOGGING_FILE_NAME=""
#ENTRYPOINT ["java", "-server", "-XX:MaxRAMPercentage=80.0", "-XshowSettings:vm", "-jar", "/lawfirm.jar"]