Files
peipei-backend/docker/Dockerfile
huchuansai da9771cb9d fix
2025-06-12 13:10:49 +08:00

17 lines
337 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM openjdk:11-jre-slim
# 设置工作目录
WORKDIR /app
# 只复制应用程序JAR包不复制lib目录
COPY ./*.jar app.jar
# 设置环境变量
ENV APP_NAME=app.jar
# 暴露应用端口
EXPOSE 8080
# 设置启动命令
CMD ["sh", "-c", "java -Dloader.path=./lib/ -Xms2g -Xmx2g -jar $APP_NAME --spring.profiles.active=test"]