添加 Dockerfile
This commit is contained in:
parent
3274f7da08
commit
c0a283469b
@ -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
|
||||
|
13
starter/Dockerfile
Normal file
13
starter/Dockerfile
Normal file
@ -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"]
|
@ -20,6 +20,7 @@
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.skcks.docking.gb28181</groupId>
|
||||
@ -28,4 +29,66 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>false</skip>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<tag>${project.version}</tag>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/**</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<testResources>
|
||||
<testResource>
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>**/**</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</testResource>
|
||||
</testResources>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue
Block a user