You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
|
|
|
FROM openjdk:8-jdk-alpine
|
|
|
|
#FROM eclipse-temurin:8-jre
|
|
|
|
|
|
|
|
## 创建目录,并使用它作为工作目录
|
|
|
|
#RUN mkdir -p /project/hzyh-admin
|
|
|
|
#WORKDIR /project/hzyh-admin
|
|
|
|
## 将后端项目的 Jar 文件,复制到镜像中
|
|
|
|
COPY target/ruoyi-admin.jar baoxiao-project.jar
|
|
|
|
|
|
|
|
## 设置 TZ 时区
|
|
|
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
|
|
|
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx1024m"
|
|
|
|
|
|
|
|
## 暴露后端项目的 48080 端口
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
## 启动后端项目
|
|
|
|
CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=${HJ} -jar baoxiao-project.jar
|