forked from power721/alist-tvbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-jre
34 lines (26 loc) · 840 Bytes
/
Dockerfile-jre
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
FROM amazoncorretto:17-alpine as corretto-deps
COPY target/alist-tvbox-1.0.jar /app/app.jar
RUN unzip /app/app.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/*" \
/app/app.jar > /modules.txt
FROM amazoncorretto:17-alpine as corretto-jdk
COPY --from=corretto-deps /modules.txt /modules.txt
# hadolint ignore=DL3018,SC2046
RUN apk add --no-cache binutils && \
jlink \
--verbose \
--add-modules "$(cat /modules.txt),jdk.crypto.ec,jdk.crypto.cryptoki" \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /jre
FROM alpine:latest
LABEL MAINTAINER="Har01d"
COPY --from=corretto-jdk /jre /jre