This file contains 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
<plugin> | |
<groupId>com.spotify</groupId> | |
<artifactId>docker-maven-plugin</artifactId> | |
<version>0.4.11</version> | |
<executions> | |
<execution> | |
<id>build-image</id> | |
<phase>package</phase> | |
<goals> | |
<goal>build</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>push-image</id> | |
<phase>deploy</phase> | |
<goals> | |
<goal>push</goal> | |
</goals> | |
<configuration> | |
<imageName>registry.example.com/app_name:${project.version}</imageName> | |
</configuration> | |
</execution> | |
</executions> | |
<configuration> | |
<imageName>app_name</imageName> | |
<imageTags> | |
<imageTag>${project.version}</imageTag> | |
<imageTag>latest</imageTag> | |
</imageTags> | |
<baseImage>java:8</baseImage> | |
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint> | |
<!-- copy the service's jar file from target into the root directory of the image --> | |
<resources> | |
<resource> | |
<targetPath>/</targetPath> | |
<directory>${project.build.directory}</directory> | |
<include>${project.build.finalName}.jar</include> | |
</resource> | |
</resources> | |
</configuration> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment