From 5d793b51a82e7c560c9c0104210d71df1c26ffe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E9=86=BA?= <14463847+zmw770157181@user.noreply.gitee.com> Date: Tue, 13 Aug 2024 15:27:48 +0800 Subject: [PATCH] =?UTF-8?q?1.Dockerfile=202.=E5=BF=BD=E7=95=A5=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 28 ++++++++++++++++++++++++++++ pom.xml | 18 +++++++++--------- 2 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e6597b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +# |- home (必然存在的目录) +# |- app.jar --启动 jar 包 +# |- logs--日志文件 +# |- 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-file","/home/uploadPath"] + +# 拷贝,执行 jar 包 +COPY ./target/cloud-modules-file.jar /home/app.jar + +# 构建启动命令 +ENTRYPOINT ["java","-jar"] +CMD ["/home/app.jar"] + diff --git a/pom.xml b/pom.xml index 9a97a0d..92364f4 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-server-parent 3.6.3 4.0.0 @@ -76,14 +76,14 @@ - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - + + + + + + + +