Skip to content

Instantly share code, notes, and snippets.

@linnykoleh
Created August 25, 2020 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linnykoleh/0cc90b993d0ced8d6bdac1efea7fde67 to your computer and use it in GitHub Desktop.
Save linnykoleh/0cc90b993d0ced8d6bdac1efea7fde67 to your computer and use it in GitHub Desktop.
Building docker image from maven
<build>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.12</version>
<executions>
<execution>
<id>tag-version</id>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
<repository>armor</repository>
<contextDirectory>${project.basedir}/docker/</contextDirectory>
<buildArgs>
<user_id>$(id -u)</user_id>
<group_id>$(id -g)</group_id>
</buildArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment