2.Dockerfile初始化
parent
f89811f837
commit
2bb48c3247
|
@ -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"]
|
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-modules</artifactId>
|
||||
<artifactId>cloud-parent</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
Loading…
Reference in New Issue