限制内存使用大小001
This commit is contained in:
parent
54b134e942
commit
0d91f15061
@ -4,7 +4,7 @@ FROM registry.cn-qingdao.aliyuncs.com/yuzl1/jdk:21
|
||||
# 将本地文件复制到容器中
|
||||
COPY target/ruoyi-admin.jar /ruoyi-admin.jar
|
||||
# 设置环境变量
|
||||
ENV JAVA_OPTS="-server -Xms512m -Xmx512m"
|
||||
ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M"
|
||||
# 时区设置
|
||||
RUN echo "Asia/shanghai" > /etc/timezone
|
||||
|
||||
|
@ -5,9 +5,9 @@ FROM registry.cn-qingdao.aliyuncs.com/yuzl1/jdk:21
|
||||
COPY target/ruoyi-monitor.jar /ruoyi-monitor.jar
|
||||
|
||||
# 设置环境变量
|
||||
ENV JAVA_OPTS="-server -Xms512m -Xmx512m"
|
||||
ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M"
|
||||
# 时区设置
|
||||
RUN echo "Asia/shanghai" > /etc/timezone
|
||||
|
||||
# 运行应用
|
||||
ENTRYPOINT exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ruoyi-monitor.jar
|
||||
ENTRYPOINT exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ruoyi-monitor.jar
|
||||
|
@ -5,7 +5,7 @@ FROM registry.cn-qingdao.aliyuncs.com/yuzl1/jdk:21
|
||||
COPY target/ruoyi-powerjob-server.jar /ruoyi-powerjob-server.jar
|
||||
|
||||
# 设置环境变量
|
||||
ENV JAVA_OPTS="-server -Xms512m -Xmx512m"
|
||||
ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M"
|
||||
# 时区设置
|
||||
RUN echo "Asia/shanghai" > /etc/timezone
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user