ruoyi-flex/ruoyi-extra/ruoyi-powerjob-server/Dockerfile

14 lines
496 B
Docker
Raw Normal View History

2024-04-06 14:31:25 +08:00
# 使用官方的 Java 运行时作为父镜像
2024-04-06 15:36:38 +08:00
FROM registry.cn-qingdao.aliyuncs.com/yuzl1/jdk:21
2024-04-06 14:31:25 +08:00
# 将本地文件复制到容器中
2024-04-06 15:36:38 +08:00
COPY target/ruoyi-powerjob-server.jar /ruoyi-powerjob-server.jar
2024-04-06 14:31:25 +08:00
2024-04-08 10:15:18 +08:00
# 设置环境变量
ENV JAVA_OPTS="-Xmx1344M -Xms1344M -Xmn448M -XX:MaxMetaspaceSize=512M -XX:MetaspaceSize=512M"
# 时区设置
RUN echo "Asia/shanghai" > /etc/timezone
2024-04-06 14:31:25 +08:00
# 运行应用
2024-04-08 10:15:18 +08:00
ENTRYPOINT exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ruoyi-powerjob-server.jar