mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
:添加dockerfile-maven插件构建Docker镜像
This commit is contained in:
parent
f78fa0a5c7
commit
7302bb3626
7
youlai-gateway/Dockerfile
Normal file
7
youlai-gateway/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM openjdk:8-jdk-alpine
|
||||||
|
VOLUME /tmp
|
||||||
|
ARG JAR_FILE
|
||||||
|
ADD target/${JAR_FILE} app.jar
|
||||||
|
EXPOSE 9999
|
||||||
|
ENTRYPOINT ["java","-jar","/app.jar"]
|
||||||
|
|
@ -13,12 +13,7 @@
|
|||||||
|
|
||||||
<artifactId>youlai-gateway</artifactId>
|
<artifactId>youlai-gateway</artifactId>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<youlai.version>1.0.0-SNAPSHOT</youlai.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.youlai</groupId>
|
<groupId>com.youlai</groupId>
|
||||||
<artifactId>common-core</artifactId>
|
<artifactId>common-core</artifactId>
|
||||||
@ -64,4 +59,33 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<youlai.version>1.0.0-SNAPSHOT</youlai.version>
|
||||||
|
<dockerfile-maven-version>1.4.13</dockerfile-maven-version>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.spotify</groupId>
|
||||||
|
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||||
|
<version>${dockerfile-maven-version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default</id>
|
||||||
|
<goals>
|
||||||
|
<goal>build</goal>
|
||||||
|
<goal>push</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<repository>${project.artifactId}</repository>
|
||||||
|
<tag>${project.version}</tag>
|
||||||
|
<buildArgs>
|
||||||
|
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
|
||||||
|
</buildArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
FROM java:8
|
|
Loading…
Reference in New Issue
Block a user