From 70d286448851af328a8974c8feaf63a9cf02ac9a Mon Sep 17 00:00:00 2001 From: yuzl6 Date: Mon, 8 Apr 2024 10:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=86=85=E5=AD=98=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=A4=A7=E5=B0=8F003?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/Dockerfile | 6 +++++- ruoyi-extra/ruoyi-monitor/Dockerfile | 2 +- ruoyi-extra/ruoyi-powerjob-server/Dockerfile | 7 ++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/Dockerfile b/ruoyi-admin/Dockerfile index bda50a7..05c6621 100644 --- a/ruoyi-admin/Dockerfile +++ b/ruoyi-admin/Dockerfile @@ -3,6 +3,10 @@ FROM registry.cn-qingdao.aliyuncs.com/yuzl1/jdk:21 # 将本地文件复制到容器中 COPY target/ruoyi-admin.jar /ruoyi-admin.jar +# 设置环境变量 +ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M" +# 时区设置 +RUN echo "Asia/shanghai" > /etc/timezone # 运行应用 -ENTRYPOINT ["java","-jar","/ruoyi-admin.jar"] +ENTRYPOINT exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ruoyi-admin.jar diff --git a/ruoyi-extra/ruoyi-monitor/Dockerfile b/ruoyi-extra/ruoyi-monitor/Dockerfile index dbf6c90..3f4325b 100644 --- a/ruoyi-extra/ruoyi-monitor/Dockerfile +++ b/ruoyi-extra/ruoyi-monitor/Dockerfile @@ -5,7 +5,7 @@ FROM registry.cn-qingdao.aliyuncs.com/yuzl1/jdk:21 COPY target/ruoyi-monitor.jar /ruoyi-monitor.jar # 设置环境变量 -ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M" +ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M" # 时区设置 RUN echo "Asia/shanghai" > /etc/timezone diff --git a/ruoyi-extra/ruoyi-powerjob-server/Dockerfile b/ruoyi-extra/ruoyi-powerjob-server/Dockerfile index c56a60a..c9b3eea 100644 --- a/ruoyi-extra/ruoyi-powerjob-server/Dockerfile +++ b/ruoyi-extra/ruoyi-powerjob-server/Dockerfile @@ -4,5 +4,10 @@ FROM registry.cn-qingdao.aliyuncs.com/yuzl1/jdk:21 # 将本地文件复制到容器中 COPY target/ruoyi-powerjob-server.jar /ruoyi-powerjob-server.jar +# 设置环境变量 +ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M" +# 时区设置 +RUN echo "Asia/shanghai" > /etc/timezone + # 运行应用 -ENTRYPOINT ["java","-jar","/ruoyi-powerjob-server.jar"] +ENTRYPOINT exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ruoyi-powerjob-server.jar