From 9f06c67bf1af6d727f9991c45d33d2d3b5b9773b Mon Sep 17 00:00:00 2001 From: hy001 Date: Mon, 20 Apr 2026 23:22:52 +0800 Subject: [PATCH] fix: make java service images command-overridable --- rc-auth/Dockerfile | 38 +++++++++++------------ rc-gateway/Dockerfile | 38 +++++++++++------------ rc-service/rc-service-console/Dockerfile | 38 +++++++++++------------ rc-service/rc-service-external/Dockerfile | 38 +++++++++++------------ rc-service/rc-service-live/Dockerfile | 38 +++++++++++------------ rc-service/rc-service-order/Dockerfile | 38 +++++++++++------------ rc-service/rc-service-other/Dockerfile | 38 +++++++++++------------ rc-service/rc-service-wallet/Dockerfile | 38 +++++++++++------------ 8 files changed, 152 insertions(+), 152 deletions(-) diff --git a/rc-auth/Dockerfile b/rc-auth/Dockerfile index 391f5f7..10f101f 100644 --- a/rc-auth/Dockerfile +++ b/rc-auth/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY target/rc-auth-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE diff --git a/rc-gateway/Dockerfile b/rc-gateway/Dockerfile index 1e593ff..3dd1e1f 100644 --- a/rc-gateway/Dockerfile +++ b/rc-gateway/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY target/rc-gateway-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE diff --git a/rc-service/rc-service-console/Dockerfile b/rc-service/rc-service-console/Dockerfile index 9e8d0af..0e5051d 100644 --- a/rc-service/rc-service-console/Dockerfile +++ b/rc-service/rc-service-console/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY console-start/target/rc-service-console-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE diff --git a/rc-service/rc-service-external/Dockerfile b/rc-service/rc-service-external/Dockerfile index d8d21c3..21b1abb 100644 --- a/rc-service/rc-service-external/Dockerfile +++ b/rc-service/rc-service-external/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY external-start/target/rc-service-external-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE diff --git a/rc-service/rc-service-live/Dockerfile b/rc-service/rc-service-live/Dockerfile index e688ce7..60c92e0 100644 --- a/rc-service/rc-service-live/Dockerfile +++ b/rc-service/rc-service-live/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY live-start/target/rc-service-live-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE diff --git a/rc-service/rc-service-order/Dockerfile b/rc-service/rc-service-order/Dockerfile index a420df2..d2071f5 100644 --- a/rc-service/rc-service-order/Dockerfile +++ b/rc-service/rc-service-order/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY order-start/target/rc-service-order-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE diff --git a/rc-service/rc-service-other/Dockerfile b/rc-service/rc-service-other/Dockerfile index cca1c51..a8759dd 100644 --- a/rc-service/rc-service-other/Dockerfile +++ b/rc-service/rc-service-other/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY other-start/target/rc-service-other-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE diff --git a/rc-service/rc-service-wallet/Dockerfile b/rc-service/rc-service-wallet/Dockerfile index 2350f0e..6287065 100644 --- a/rc-service/rc-service-wallet/Dockerfile +++ b/rc-service/rc-service-wallet/Dockerfile @@ -15,22 +15,22 @@ RUN apt-get update \ WORKDIR /application COPY wallet-start/target/rc-service-wallet-*.jar /application/service.jar -ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \ - -Dnacos.remote.client.grpc.timeout=6000 \ - -Dnacos.remote.client.grpc.server.check.timeout=6000 \ - -Dnacos.remote.client.grpc.health.timeout=6000 \ - --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ - --add-opens java.base/java.io=ALL-UNNAMED \ - --add-opens java.base/java.math=ALL-UNNAMED \ - --add-opens java.base/java.net=ALL-UNNAMED \ - --add-opens java.base/java.nio=ALL-UNNAMED \ - --add-opens java.base/java.security=ALL-UNNAMED \ - --add-opens java.base/java.text=ALL-UNNAMED \ - --add-opens java.base/java.time=ALL-UNNAMED \ - --add-opens java.base/java.util=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ - --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ - $JVM_OPTION \ - -jar /application/service.jar \ - --server.port=$SERVER_PORT \ - --spring.profiles.active=$SERVER_PROFILE_ACTIVE +CMD exec java -Djava.security.egd=file:/dev/./urandom \ + -Dnacos.remote.client.grpc.timeout=6000 \ + -Dnacos.remote.client.grpc.server.check.timeout=6000 \ + -Dnacos.remote.client.grpc.health.timeout=6000 \ + --add-opens java.base/java.lang.invoke=ALL-UNNAMED \ + --add-opens java.base/java.io=ALL-UNNAMED \ + --add-opens java.base/java.math=ALL-UNNAMED \ + --add-opens java.base/java.net=ALL-UNNAMED \ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/java.security=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.base/java.time=ALL-UNNAMED \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.access=ALL-UNNAMED \ + --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \ + $JVM_OPTION \ + -jar /application/service.jar \ + --server.port=$SERVER_PORT \ + --spring.profiles.active=$SERVER_PROFILE_ACTIVE