You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
713 B
24 lines
713 B
6 months ago
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||
|
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
||
|
FROM eclipse-temurin:17-jre-alpine
|
||
|
|
||
|
## 创建目录,并使用它作为工作目录
|
||
|
RUN mkdir -p /opt/win-server
|
||
|
WORKDIR /opt/win-server
|
||
|
## 将后端项目的 Jar 文件,复制到镜像中
|
||
|
COPY ./win-server/target/win-server.jar win-server.jar
|
||
|
|
||
|
## 设置 TZ 时区
|
||
|
ENV TZ=Asia/Shanghai
|
||
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||
|
ENV JAVA_OPTS=""
|
||
|
|
||
|
## 应用参数
|
||
|
ENV ARGS=""
|
||
|
|
||
|
## 暴露后端项目的 25210 端口
|
||
|
EXPOSE 25210
|
||
|
|
||
|
## 启动后端项目
|
||
|
CMD java ${JAVA_OPTS} -jar win-server.jar $ARGS
|