Skip to content

Commit

Permalink
[WIP wildfly-extras#98] Use docker-maven-plugin to generate images
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Jun 15, 2015
1 parent 28451c9 commit 9a1db30
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 61 deletions.
23 changes: 0 additions & 23 deletions docker/etc/context/Dockerfile

This file was deleted.

47 changes: 14 additions & 33 deletions docker/pom.xml
Expand Up @@ -36,6 +36,7 @@

<!-- Properties -->
<properties>
<docker.image.from>jboss/wildfly:${version.wildfly}</docker.image.from>
<docker.image.name>wildflyext/wildfly-camel</docker.image.name>
<docker.image.version>latest</docker.image.version>
</properties>
Expand All @@ -54,42 +55,10 @@
<!-- Build -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>docker</finalName>
<descriptors>
<descriptor>scripts/assembly-artifacts.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
<executions>
<execution>
<id>remove-images</id>
<phase>package</phase>
<goals>
<goal>remove</goal>
</goals>
<configuration>
<images>
<image>${docker.image.name}:${docker.image.version}</image>
<image>${docker.image.name}:${project.version}</image>
</images>
</configuration>
</execution>
<execution>
<id>build-docker-image</id>
<phase>install</phase>
Expand All @@ -101,12 +70,24 @@
<image>
<name>${docker.image.name}</name>
<build>
<from>${docker.image.from}</from>
<cmd>
<shell>-c standalone-camel.xml -b 0.0.0.0 -bmanagement 0.0.0.0</shell>
</cmd>
<entryPoint>
<shell>/opt/jboss/wildfly/bin/entrypoint.sh</shell>
</entryPoint>
<ports>
<port>9999</port>
</ports>
<tags>
<tag>${docker.image.version}</tag>
<tag>${project.version}</tag>
</tags>
<assembly>
<dockerFileDir>target/docker</dockerFileDir>
<basedir>/opt/jboss/wildfly</basedir>
<descriptor>${project.basedir}/scripts/assembly-artifacts.xml</descriptor>
<user>jboss:jboss:jboss</user>
</assembly>
</build>
</image>
Expand Down
6 changes: 2 additions & 4 deletions docker/scripts/assembly-artifacts.xml
Expand Up @@ -29,10 +29,9 @@

<fileSets>
<fileSet>
<outputDirectory>/</outputDirectory>
<outputDirectory>bin</outputDirectory>
<directory>etc/context</directory>
<includes>
<include>Dockerfile</include>
<include>entrypoint.sh</include>
</includes>
<filtered>true</filtered>
Expand All @@ -46,9 +45,8 @@
<include>org.wildfly.camel:wildfly-camel-patch:tar.gz</include>
</includes>
<scope>provided</scope>
<unpack>false</unpack>
<unpack>true</unpack>
</dependencySet>
</dependencySets>


</assembly>
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -86,7 +86,7 @@

<!-- Plugin versions -->
<version-build-helper-plugin>1.9.1</version-build-helper-plugin>
<version-docker-maven-plugin>0.11.1</version-docker-maven-plugin>
<version-docker-maven-plugin>0.12.0</version-docker-maven-plugin>
<version-groovy-maven-plugin>2.0</version-groovy-maven-plugin>
<version-license-maven-plugin>1.8</version-license-maven-plugin>
<version-maven-antrun-plugin>1.7</version-maven-antrun-plugin>
Expand Down

0 comments on commit 9a1db30

Please sign in to comment.