Compare commits

...

2 commits

3 changed files with 17 additions and 7 deletions

View file

@ -47,9 +47,8 @@ RUN mv ./* /build/dist/
FROM ubuntu:24.10 AS run
COPY --from=build /build/dist/jre /usr/lib/jvm/openj9-jre
RUN ln -s /usr/lib/jvm/openj9-jre/bin/java /usr/bin/java
ENV JAVA_HOME=/usr/lib/jvm/openj9-jre
ENV PATH="$JAVA_HOME/bin:$PATH"
# verify installation
RUN java --version

View file

@ -37,10 +37,7 @@ WORKDIR /app
COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
COPY --from=build /app/VERSION /app/VERSION
CMD java -server -Xmx${MAX_MEMORY:-1G} -Xaggressive \
-XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication \
-XX:+UseCompressedOops -XX:+UseNUMA -XX:+IdleTuningGcOnIdle -Xgcpolicy:gencon \
-Xshareclasses:allowClasspaths -Xtune:virtualized -Xcompactgc \
-jar /app/piped.jar
COPY ./piped.sh ./
CMD ["/app/piped.sh"]
# ------

14
piped.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
java -server -Xmx${MAX_MEMORY:-1G} -Xaggressive \
-XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication \
-XX:+UseCompressedOops -XX:+UseNUMA -XX:+IdleTuningGcOnIdle -Xgcpolicy:gencon \
-Xshareclasses:allowClasspaths -Xtune:virtualized -Xcompactgc \
-jar /app/piped.jar &
pid=$!
trap "kill -INT $pid" INT
trap "kill -TERM $pid" TERM
wait