Last active
August 29, 2015 14:05
-
-
Save rhuss/21ace7e6581079e2468c to your computer and use it in GitHub Desktop.
docker-maven-plugin configuration Samples
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>org.jolokia</groupId> | |
<artifactId>docker-maven-plugin</artifactId> | |
<version>${docker.maven.plugin.version}</version> | |
<configuration> | |
<image> | |
<id>tomcat</id> | |
<name>consol/tomcat-7.0</name> | |
<run> | |
<volumesFrom>data</volumesFrom> | |
<env> | |
<CATALINA_OPTS>-Xmx32m</CATALINA_OPTS> | |
</env> | |
<ports> | |
<port>jolokia.port:8080</port> | |
</ports> | |
<waitHttp>http://localhost:${jolokia.port}/jolokia</waitHttp> | |
<wait>10000</wait> | |
</run> | |
</image> | |
<image> | |
<id>data</id> | |
<name>jolokia/docker-jolokia-demo</name> | |
<build> | |
<assemblyDescriptor>src/main/docker-assembly.xml</assemblyDescriptor> | |
</build> | |
</image> | |
</configuration> | |
</plugin> |
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>org.jolokia</groupId> | |
<artifactId>docker-maven-plugin</artifactId> | |
<version>${docker.maven.plugin.version}</version> | |
<configuration> | |
<image> | |
<id>micro-service</id> | |
<name>jolokia/${project.artifactId}:${project.version}</name> | |
<build> | |
<baseImage>java</baseImage> | |
<assemblyDescriptor>src/main/docker-assembly.xml</assemblyDescriptor> | |
<command>java -Djava.security.egd=file:/dev/./urandom -jar /maven/tomcat-jolokia.jar</command> | |
</build> | |
<run> | |
<ports> | |
<port>tomcat.port:8080</port> | |
</ports> | |
<waitHttp>http://localhost:${tomcat.port}/jolokia</waitHttp> | |
<wait>10000</wait> | |
<links> | |
<link>mongo:db</link> | |
</links> | |
</run> | |
</image> | |
<image> | |
<id>mongo</id> | |
<name>mongo</name> | |
<run/> | |
</image> | |
</configuration> | |
</plugin> |
"mongo" is a complete image pulled from an registry (and hence already deployed). In practice you probably wont use a vanilla 'mongo' image but build one using this as a BASE. So you would need a "" configuration section here as well. This image can then be deployed as the other built images.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good examples! How you deploy the mongo:db images with this setup?