Files
dsProject/dsGw/Dockerfile
2025-08-14 15:45:08 +08:00

24 lines
898 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 dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:21
# WORKDIR指令用于设置容器内部的工作目录即后续指令执行时的当前目录。当Docker容器启动并执行命令时这些命令将在WORKDIR指定的目录中执行。
WORKDIR /root
# ENV TZ这样的用法通常是用来设置时区环境变量TZ代表Time Zone
ENV TZ=Asia/Shanghai
# 让容器内部正常显示中文
ENV LANG C.UTF-8
# 将target文件夹下的jar包gw-charge.jar复制到容器的/root目录下
COPY ./lib /root/lib
COPY ./target /root/target
#设置这个环境变量后您可以在Docker容器中启动Java应用程序时使用这些参数。
ENV JAVA_OPTS="-Xms512m -Xmx1024m"
# 标识为生产环境
ENV WORKING_ENV="pro"
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -cp /root/target/classes:/root/lib/* com.dsideal.gw.GwApplication" ]