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