-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (44 loc) · 1.24 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM gradle:8.4.0-jdk17-jammy AS BUILD
WORKDIR /appbuild
COPY . .
RUN gradle build -Dquarkus.package.type=uber-jar --no-daemon
#FROM amazoncorretto:17-alpine as CORRETTO-DEPS
#
#WORKDIR /app
#
#COPY --from=build /appbuild/build/paddy-backend-runner.jar .
#
## Get modules list
#RUN unzip paddy-backend-runner.jar -d temp && \
# jdeps \
# --print-module-deps \
# --ignore-missing-deps \
# --recursive \
# --multi-release 17 \
# --class-path="./temp/BOOT-INF/lib/*" \
# --module-path="./temp/BOOT-INF/lib/*" \
# paddy-backend-runner.jar > modules.txt
#
#FROM amazoncorretto:17-alpine as CORRETTO-JDK
#
#WORKDIR /app
#
#COPY --from=corretto-deps /app/modules.txt .
#
## Output a custom jre built from the modules list
#RUN apk add --no-cache binutils && \
# jlink \
# --verbose \
# --add-modules "$(cat modules.txt)" \
# --strip-debug \
# --no-man-pages \
# --no-header-files \
# --compress=2 \
# --output /jre
FROM amazoncorretto:17-alpine as CORRETTO-JDK
#COPY --from=corretto-jdk /jre /app/jre
COPY --from=build /appbuild/build/paddy-backend-runner.jar /app/paddy-backend-runner.jar
WORKDIR /app
ARG DEBUG_OPT
ENV DEBUG_API_OPT=$DEBUG_OPT
CMD java $DEBUG_API_OPT -jar paddy-backend-runner.jar