perf: yudao-server/Dockerfile添加$ARGS参数

This commit is contained in:
dhb52 2023-04-25 22:54:11 +08:00
parent 9bdd71dbf1
commit c139be1966

View File

@ -9,11 +9,15 @@ WORKDIR /yudao-server
COPY ./target/yudao-server.jar app.jar
## 设置 TZ 时区
ENV TZ=Asia/Shanghai
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m"
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
## 应用参数
ENV ARGS=""
## 暴露后端项目的 48080 端口
EXPOSE 48080
## 启动后端项目
CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
CMD java ${JAVA_OPTS} -jar app.jar $ARGS