Skip to content

Instantly share code, notes, and snippets.

@welshstew
Created April 6, 2016 09:58
Show Gist options
  • Select an option

  • Save welshstew/9c2436b41c3e7ca278edaa10edf6f789 to your computer and use it in GitHub Desktop.

Select an option

Save welshstew/9c2436b41c3e7ca278edaa10edf6f789 to your computer and use it in GitHub Desktop.
docker assembly.xml files and stuff for the docker-maven-plugin (adding extra stuff into the base image)
<!-- structure of project (in xml) X-D -->
<src>
<main>
<docker>
<amq-62>
<opt>
<amq>
<bin>configure.sh (empty shell file to override the s2i configure.sh)</bin>
<conf>activemq.xml file (fully configured as you want it to be)</conf>
</amq>
</opt>
</amq-62>
assembly.xml
</docker>
<java>
stuff here to create the jar
</java>
</main>
</src>
<!-- assembly.xml -->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>amq-it</id>
<dependencySets>
<dependencySet>
<includes>
<include>symphony-eu-amq:symphony-spring-amq-broker</include>
<include>io.fabric8:kubernetes-client</include>
<include>io.fabric8:kubernetes-model</include>
<include>io.fabric8:openshift-client</include>
<include>com.squareup.okhttp:okhttp</include>
<include>com.squareup.okhttp:okhttp-ws</include>
<include>com.squareup.okio:okio</include>
<include>com.squareup.okhttp:logging-interceptor</include>
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</include>
<include>org.yaml:snakeyaml</include>
</includes>
<outputDirectory>lib/extra/</outputDirectory>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.basedir}/src/main/docker/amq-62/opt/amq/bin</directory>
<outputDirectory>bin/</outputDirectory>
<filtered>true</filtered>
<includes>
<include>configure.sh</include>
</includes>
<fileMode>755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/docker/amq-62/opt/amq/conf</directory>
<outputDirectory>conf/</outputDirectory>
<filtered>true</filtered>
<includes>
<include>activemq.xml</include>
</includes>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
</assembly>
<!-- pom.xml -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<images>
<image>
<name>${docker.image}</name>
<build>
<from>registry.access.redhat.com/jboss-amq-6/amq62-openshift:1.2</from>
<assembly>
<mode>dir</mode>
<basedir>/opt/amq</basedir>
<descriptor>${project.basedir}/src/main/docker/assembly.xml</descriptor>
</assembly>
</build>
</image>
</images>
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment