`

docker-maven-plugin

阅读更多
Dockerfile
FROM java
MAINTAINER "zhan5"<822786603@qq.com>
ADD @project.build.finalName@.jar app.jar
EXPOSE 8080
CMD java -jar app.jar

maven插件
<plugin>
      <groupId>com.spotify</groupId>
      <artifactId>docker-maven-plugin</artifactId>
      <version>0.4.10</version>
      <configuration>
        <imageName>${project.groupId}/${project.artfactId}:${project.version}</imageName>
        <dockerDirectory>${project.build.outputDirectory}</dockerDirectory>
        <resources>
           <resource>
             <directory>${project.build.directory}</directory>
             <include>${project.build.finalName}.jar</include>
           </resource>
        </resources>
      </configuration>
    </plugin>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics