Created
August 2, 2017 05:55
-
-
Save gwokudasam/94872c7456389852b3b6b7e0667a5f13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profiles> | |
<profile> | |
<id>docker</id> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.spotify</groupId> | |
<artifactId>docker-maven-plugin</artifactId> | |
<version>0.4.13</version> | |
<executions> | |
<execution> | |
<id>build-image</id> | |
<phase>package</phase> | |
<goals> | |
<goal>build</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>tag-image</id> | |
<phase>install</phase> | |
<goals> | |
<goal>tag</goal> | |
<goal>push</goal> | |
</goals> | |
<configuration> | |
<image>enikolas/${project.artifactId}</image> | |
<newName>enikolas/${project.artifactId}</newName> | |
<imageName>enikolas/${project.artifactId}</imageName> | |
</configuration> | |
</execution> | |
</executions> | |
<configuration> | |
<baseImage>java:8-jre-alpine</baseImage> | |
<imageName>enikolas/${project.artifactId}</imageName> | |
<serverId>docker-hub</serverId> | |
<entryPoint> | |
["java", "-jar", "-Dspring.profiles.active=docker", "/${project.build.finalName}.jar"] | |
</entryPoint> | |
<imageTags> | |
<imageTag>${project.version}</imageTag> | |
<imageTag>latest</imageTag> | |
</imageTags> | |
<resources> | |
<resource> | |
<targetPath>/</targetPath> | |
<directory>${project.build.directory}</directory> | |
<include>${project.build.finalName}.jar</include> | |
</resource> | |
</resources> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</profile> | |
</profiles> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment