diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index accbadb..c28da77 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -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 diff --git a/Dockerfile.piped b/Dockerfile.piped index 6a31bb1..361ad2e 100644 --- a/Dockerfile.piped +++ b/Dockerfile.piped @@ -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"] # ------ diff --git a/piped.sh b/piped.sh new file mode 100755 index 0000000..47ba736 --- /dev/null +++ b/piped.sh @@ -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