File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed
Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change 1- FROM ghcr.io/graalvm/jdk:21.3
1+ FROM amazoncorretto:17
2+ WORKDIR /build
3+ COPY ./target/*.jar /app/app.jar
4+ RUN cd /app && jar -xf app.jar && \
5+ jdeps \
6+ --ignore-missing-deps \
7+ --print-module-deps \
8+ -q \
9+ --recursive \
10+ --multi-release 17 \
11+ --class-path="BOOT-INF/lib/*" \
12+ --module-path="BOOT-INF/lib/*" \
13+ app.jar > /deps
14+ RUN jlink \
15+ --verbose \
16+ --add-modules $(cat /deps),jdk.naming.dns,jdk.crypto.ec \
17+ --strip-java-debug-attributes \
18+ --no-man-pages \
19+ --no-header-files \
20+ --compress=2 \
21+ --output /jre
22+
23+ FROM gcr.io/distroless/java-base-debian11
24+ COPY --from=0 /jre /jre
225WORKDIR /data/symphony
326COPY ./target/*.jar app.jar
4- RUN useradd symphony && chmod -R 755 /data/symphony
5- USER symphony
6- ENTRYPOINT [ "java" , "-jar" , "./app.jar" , "--spring.profiles.active=prod" ]
27+ ENTRYPOINT [ "/jre/bin/java" , "-jar" , "./app.jar" , "--spring.profiles.active=prod" ]
You can’t perform that action at this time.
0 commit comments