From c0a283469b8f62f1b39f57ace9f5f0263e263b6b Mon Sep 17 00:00:00 2001
From: shikong <919411476@qq.com>
Date: Mon, 4 Sep 2023 16:41:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Dockerfile?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package-docker.sh | 2 +-
starter/Dockerfile | 13 ++++++++++
starter/pom.xml | 65 +++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 78 insertions(+), 2 deletions(-)
create mode 100644 starter/Dockerfile
diff --git a/package-docker.sh b/package-docker.sh
index fea31a3..708984e 100644
--- a/package-docker.sh
+++ b/package-docker.sh
@@ -10,5 +10,5 @@ docker run --name maven --rm \
-w /usr/src/mymaven \
maven:3.9.3-eclipse-temurin-17-alpine \
mvn clean package -DskipTests -Pdocker
-docker save skcks.cn/gb28181-docking-platform -o gb28181-docking-platform.image
+docker save skcks.cn/gb28181-docking-platform-mocking -o gb28181-docking-platform-mocking.image
ls -lh *.image
diff --git a/starter/Dockerfile b/starter/Dockerfile
new file mode 100644
index 0000000..b7ee179
--- /dev/null
+++ b/starter/Dockerfile
@@ -0,0 +1,13 @@
+FROM eclipse-temurin:17-jre
+
+MAINTAINER Shikong <919411476@qq.com>
+
+ENV HOME_PATH /opt/gb28181-docking-platform-mocking/
+RUN mkdir -p $HOME_PATH
+WORKDIR $HOME_PATH
+
+ADD target/starter.jar /opt/gb28181-docking-platform-mocking/starter.jar
+
+EXPOSE 18182
+
+ENTRYPOINT ["java", "-jar","/opt/gb28181-docking-platform-mocking/starter.jar"]
diff --git a/starter/pom.xml b/starter/pom.xml
index 5977fff..78e4d7e 100644
--- a/starter/pom.xml
+++ b/starter/pom.xml
@@ -20,6 +20,7 @@
17
UTF-8
+
cn.skcks.docking.gb28181
@@ -27,5 +28,67 @@
0.0.1-SNAPSHOT
-
+
+
+ ${project.artifactId}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ false
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+ repackage
+
+ repackage
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+
+
+
+
+ com.spotify
+ dockerfile-maven-plugin
+
+ ${project.version}
+
+
+
+
+
+
+ src/main/resources
+
+ **/**
+
+ true
+
+
+
+
+
+ src/test/resources
+
+ **/**
+
+ true
+
+
+
\ No newline at end of file