From 4dd73582dc5d854c8cfe818cf5d64cfc970122a9 Mon Sep 17 00:00:00 2001
From: ruyaxie <648179520@qq.comgit>
Date: Fri, 26 Jul 2024 01:03:38 +0800
Subject: [PATCH] =?UTF-8?q?1.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..ff21955
--- /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-gateway","/home/uploadPath"]
+#拷贝执行jar文件
+COPY ./target/cloud-gateway.jar /home/app.jar
+#构建启动命令
+ENTRYPOINT ["java","-jar"]
+CMD ["/home/app.jar"]
diff --git a/pom.xml b/pom.xml
index fe40c27..23004c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
com.muyu
- cloud-server
+ cloud-parent
3.6.3
4.0.0