From 2bb48c32474c280670d7a2dbfe3059a03961117f Mon Sep 17 00:00:00 2001 From: ruyaxie <648179520@qq.comgit> Date: Fri, 26 Jul 2024 01:05:04 +0800 Subject: [PATCH] =?UTF-8?q?2.Dockerfile=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 17 +++++++++++++++++ pom.xml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4aa167e --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/pom.xml b/pom.xml index 954bde9..86d4c60 100644 --- a/pom.xml +++ b/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"> com.muyu - cloud-modules + cloud-parent 3.6.3 4.0.0