2.Dockerfile初始化

master
ruyaxie 2024-07-26 01:05:04 +08:00
parent f89811f837
commit 2bb48c3247
2 changed files with 18 additions and 1 deletions

17
Dockerfile 100644
View File

@ -0,0 +1,17 @@
# |-home
# |- app.jar -启动jar包
# |- log -日志文件
# |- uploadPath
#指定构建容器镜像的起始镜像
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/dragonwell:17.0.4.0.4.8-standard-ga-8.6
#定义时区
ENV TZ=Asia/Shanghai
#执行一些必备的条件
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
#挂载工作目录
VOLUME ["/home/logs/cloud-system","/home/uploadPath"]
#拷贝执行jar文件
COPY ./target/cloud-system.jar /home/app.jar
#构建启动命令
ENTRYPOINT ["java","-jar"]
CMD ["/home/app.jar"]

View File

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>com.muyu</groupId> <groupId>com.muyu</groupId>
<artifactId>cloud-modules</artifactId> <artifactId>cloud-parent</artifactId>
<version>3.6.3</version> <version>3.6.3</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>