<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Docker on Roland Huß</title><link>https://ro14nd.de/tags/docker/</link><description>Recent content in Docker on Roland Huß</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Roland Huß</copyright><lastBuildDate>Wed, 11 Jul 2018 00:00:00 +0000</lastBuildDate><atom:link href="https://ro14nd.de/tags/docker/index.xml" rel="self" type="application/rss+xml"/><item><title>First look at Jib</title><link>https://ro14nd.de/jib-vs-dmp/</link><pubDate>Wed, 11 Jul 2018 00:00:00 +0000</pubDate><guid>https://ro14nd.de/jib-vs-dmp/</guid><description>&lt;p&gt;As soon as Google&amp;rsquo;s blog post &lt;a href="https://cloudplatform.googleblog.com/2018/07/introducing-jib-build-java-docker-images-better.html" target="_blank" rel="noreferrer"&gt;&amp;ldquo;Introducing Jib — build Java Docker images better&amp;rdquo;&lt;/a&gt; was online, all my channels went crazy about &lt;a href="https://github.com/GoogleContainerTools/jib" target="_blank" rel="noreferrer"&gt;Jib&lt;/a&gt;.
That was a bit surprising as Jib was started over one year ago but with this blog post this project rockets with more than 1000 new GitHub stars within one day. Crazy.&lt;/p&gt;
&lt;p&gt;I got a lot asked yesterday how Jib compares to &lt;a href="https://github.com/fabric8io/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;fabric8io/docker-maven-plugin&lt;/a&gt; (d-m-p) or &lt;a href="https://github.com/fabric8io/fabric8-maven-plugin" target="_blank" rel="noreferrer"&gt;fabric8io/fabric8-maven-plugin&lt;/a&gt; which includes d-m-p.&lt;/p&gt;
&lt;p&gt;Let me try to shed some light on the differences and pro and cons of both approaches.&lt;/p&gt;

&lt;h2 class="relative group"&gt;How Jib works
 &lt;div id="how-jib-works" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-jib-works" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s first have a quick look what Jib offers today and what makes it unique.&lt;/p&gt;
&lt;p&gt;Looking at the Jib Maven plugin it currently supports three goals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;jib:dockerBuild&lt;/code&gt; for assembling an image and loading it to a Docker daemon.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;jib:build&lt;/code&gt; for assembling the image and pushing it to a Docker registry.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;jib:exportDockerContext&lt;/code&gt; for creating a Dockerfile along with all the files required for performing a build against a Docker daemon.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The unique asset of Jib is that it does all of this &lt;em&gt;without consulting a Docker daemon&lt;/em&gt; by creating all image layers and metadata locally, conforming to either the Docker or OCI format.
And that all directly with plain Java code.&lt;/p&gt;
&lt;p&gt;Also, Jib assumes a very opinionated project setup with a so-called &lt;em&gt;flat classpath app&lt;/em&gt; with main class, dependencies and resources all in different artefacts.
Compare this to &lt;em&gt;fat jars&lt;/em&gt; popularised by Spring Boot, where the application code, resources and dependencies are all stored in the same jar file.
There are some drawbacks of flat classpath app, but one benefit is, that you can organise the various files into several layers in your image, putting the one which is changing less (like dependencies) at the bottom of the layer stack.
That&amp;rsquo;s what Jib does: It puts all dependency jars into one layer, all resource files (like property files to be loaded from the classpath) in another and the application classes into a third layer.
All of these layers get aggressively cached locally.
That way, you can be much faster when recreating images than with fat jars which apparently can be stored only in one single layer.&lt;/p&gt;
&lt;p&gt;But let&amp;rsquo;s have a look how Jib works in detail. The steps performed by a &lt;code&gt;jib:dockerBuild&lt;/code&gt; or &lt;code&gt;jib:build&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fetch base image&amp;rsquo;s layers and cache them locally. By default the base image is &lt;code&gt;gcr.io/distroless/java&lt;/code&gt;, but this can be configured.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create three application image layers for&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dependencies&lt;/li&gt;
&lt;li&gt;Resources&lt;/li&gt;
&lt;li&gt;Classes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since these layers are cached, if any of them doesn&amp;rsquo;t change (which is likely for dependencies), then the layer is not recreated.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the application image locally. The two previous steps were performed asynchronously; this step continues when both previous steps have been finished. The &lt;code&gt;ENTRYPOINT&lt;/code&gt; of this image is fixed set to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; java &amp;lt;jvm-flags&amp;gt; -cp dep_dir/*:resource_dir/:class_dir/ &amp;lt;main-class&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where &lt;code&gt;&amp;lt;jvm-flags&amp;gt;&lt;/code&gt; can optionally be configured and &lt;code&gt;&amp;lt;main-class&amp;gt;&lt;/code&gt; is the mandatory main class to specify. The information leading to the classpath comes from the underlying Maven or Gradle project information. Also, any Java arguments configured to become the &lt;code&gt;CMD&lt;/code&gt; of the image, as well the exposed ports (&lt;code&gt;EXPOSE&lt;/code&gt;) can be added, too.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Finally the local image layers along with its meta-data is tarred up, and either loaded into a Docker daemon or pushed to a Docker registry.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;How does Jib compare to d-m-p ?
 &lt;div id="how-does-jib-compare-to-d-m-p-" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-does-jib-compare-to-d-m-p-" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Jib is impressive for the use case it supports and brings a fresh spin to the way how Java apps can be packaged into Docker images.&lt;/p&gt;
&lt;p&gt;The most significant benefits of Jib are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fast for incremental builds when you have a &lt;em&gt;flat classpath application&lt;/em&gt;, resulting in three different layers for dependencies, resources and your application classes.&lt;/li&gt;
&lt;li&gt;No Docker daemon required, which reduces the build requirements and increases security because the image creation happens without root permissions.&lt;/li&gt;
&lt;li&gt;Produces reproducible images by wiping out file owner and modifications date. However, not sure whether e.g. generated timestamps in resource files like properties are wiped out, too.&lt;/li&gt;
&lt;li&gt;It supports both, Maven and Gradle.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, there are also some limitations. Some of them might be tackled in the future, but other might not be changed due to the unique way how Jib works:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can be only used for simple &lt;em&gt;flat classpath&lt;/em&gt; Java applications. There is currently no support for fat jars (i.e. Spring Boot fat jars) nor other packaging formats like WAR file.&lt;/li&gt;
&lt;li&gt;Simplistic startup of the application with a plain &lt;code&gt;java&lt;/code&gt; call instead of using a full features startup script like &lt;a href="https://github.com/fabric8io-images/run-java-sh" target="_blank" rel="noreferrer"&gt;run-java-sh&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;No additional files like configuration files outside the classpath or agents like &lt;code&gt;jmx_exporter&lt;/code&gt; agent can be added (but there is a &lt;a href="https://github.com/GoogleContainerTools/jib/pull/455" target="_blank" rel="noreferrer"&gt;PR&lt;/a&gt; pending for agents).&lt;/li&gt;
&lt;li&gt;Fixed classpath order, e.g. doesn&amp;rsquo;t allow for overwritten resources in dependencies as dependencies are always first on the classpath.&lt;/li&gt;
&lt;li&gt;Jib uses a custom XML configuration syntax instead of plain Dockerfile syntax (which I often heard as a major critique about d-m-p which also supports a custom XML configuration, but as alternative to Dockerfiles).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;d-m-p provides some additional features which are not supported by Jib, like&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Running containers for integration testing (that&amp;rsquo;s very likely the most prominent difference)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Dockerfile&lt;/code&gt; support&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docker-compose.yml&lt;/code&gt; support&lt;/li&gt;
&lt;li&gt;Enhanced authentication support OpenShift and Amazon ECR support&lt;/li&gt;
&lt;li&gt;Support for watching code change and then automatically triggering a rebuild of images and restart of containers&lt;/li&gt;
&lt;li&gt;Support for arbitrary assembly and base images, including Spring Boot fat jar and JavaEE containers.&lt;/li&gt;
&lt;li&gt;Healthchecks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And if you jump to &lt;a href="https://github.com/fabric8io/fabric8-maven-plugin" target="_blank" rel="noreferrer"&gt;fabric8-maven-plugin&lt;/a&gt;, which includes d-m-p for its image building business, you have even more high level features like a &lt;a href="https://maven.fabric8.io/#zero-config" target="_blank" rel="noreferrer"&gt;zero config&lt;/a&gt; mode which analyses your &lt;code&gt;pom.xml&lt;/code&gt; and selects opinionated defaults like base images and handcrafted startup scripts, depending on the type of tech stack you are using (like Spring Boot, Thorntail, Vert.x, Tomcat, &amp;hellip;)&lt;/p&gt;

&lt;h2 class="relative group"&gt;Next steps &amp;hellip;
 &lt;div id="next-steps-" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#next-steps-" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;This overview is only a quick glance on Jib. In one of the next posts, I plan to show some real-life examples and also measuring the performance gain by using Jib.&lt;/p&gt;
&lt;p&gt;Also, there a plans for d-m-p to add support for Jib backend and other daemonless build systems like &lt;a href="https://github.com/genuinetools/img" target="_blank" rel="noreferrer"&gt;img&lt;/a&gt;, &lt;a href="https://github.com/projectatomic/buildah" target="_blank" rel="noreferrer"&gt;buildah&lt;/a&gt; or &lt;a href="https://github.com/GoogleContainerTools/kaniko" target="_blank" rel="noreferrer"&gt;kaniko&lt;/a&gt;.
The mid to longterm plan is to enhance the build abstraction within d-m-p and offer, based on the Java project given, different ways to build images.&lt;/p&gt;
&lt;p&gt;BTW, if you are interested in what&amp;rsquo;s going on in Docker image building business these days, you probably might find this &lt;a href="https://www.youtube.com/watch?v=qhykcC94ukg" target="_blank" rel="noreferrer"&gt;KubeCon presentation&lt;/a&gt; as useful as I did. Daemonless FTW :)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Psst, d-m-p also likes GitHub &lt;a href="https://github.com/fabric8io/docker-maven-plugin/stargazers" target="_blank" rel="noreferrer"&gt;★&lt;/a&gt; ;-)&lt;/em&gt;&lt;/p&gt;</description></item><item><title>docker-maven-plugin might be still useful</title><link>https://ro14nd.de/dmp-not-so-bad/</link><pubDate>Thu, 05 Jul 2018 00:00:00 +0000</pubDate><guid>https://ro14nd.de/dmp-not-so-bad/</guid><description>&lt;p&gt;Yesterday a blog post &lt;a href="https://codefresh.io/howtos/using-docker-maven-maven-docker/" target="_blank" rel="noreferrer"&gt;Using Docker from Maven and Maven from Docker&lt;/a&gt; by &lt;a href="https://twitter.com/codepipes" target="_blank" rel="noreferrer"&gt;Kostis Kapelonis&lt;/a&gt; was published which gives some insights on the possible relationships between Docker and Maven.
The article makes some essential points really, and gives an overview for the two remaining Docker Maven plugins as well as how &lt;a href="https://codefresh.io/" target="_blank" rel="noreferrer"&gt;Codefresh&lt;/a&gt; recommends doing Docker multi-stage builds as the alternative.
As I&amp;rsquo;m the maintainer of the &lt;a href="https://dmp.fabric8.io/" target="_blank" rel="noreferrer"&gt;fabric8io/docker-maven-plugin&lt;/a&gt;, I&amp;rsquo;d like to comment on this matter.&lt;/p&gt;
&lt;p&gt;I already commented on the original blog post (thanks for approving the comment), but I&amp;rsquo;m happy to repeat my arguments
here again.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://codefresh.io/howtos/using-docker-maven-maven-docker/" target="_blank" rel="noreferrer"&gt;article&lt;/a&gt; ditches two docker-maven-plugins before it promotes Docker multi-stage builds for some reasons.&lt;/p&gt;
&lt;p&gt;To be honest, I think both approaches have their benefits, but let me comment first on two arguments given concerning the &lt;a href="https://github.com/fabric8io/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;fabric8io/docker-maven-plugin&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;There have been cases in the past where Docker has broken compatibility even between its client and server, so a Maven plugin that uses the same API will instantly break as well.&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;This compatibility issue might be right especially if you use a typed approach to access the Docker REST API which is used by various Docker client libraries. As explained in the post, fabric8 d-m-p accesses the Docker daemon directly without any client library and with not marshalling. This is because it accesses only the parts required for the plugin&amp;rsquo;s feature set, which also means that json responses are handled in a very defensive and untyped way.&lt;/p&gt;
&lt;p&gt;And yes, there was one issue in the early days in 2014 with a backwards-incompatible API change from Docker. This issue could be fixed quite quickly because d-m-p hadn&amp;rsquo;t to wait for a client library to be updated. However, since then there never has been an issue and for the core functionality that d-m-p uses.&lt;/p&gt;
&lt;p&gt;I think the relevance of Docker API incompatibilities is exaggerated in this blog post.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Hopefully, the fabric8 plugin also supports plain Dockerfiles. Even there, however, it has some strong opinions. It assumes that the Dockerfile of a project is in src/main/docker and also it uses the assembly syntax for actually deciding what artefact is available during the Docker build step.&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;That is simply not true. You can just put a Dockerfile on the same level as the pom.xml, refer to your artefacts in the &lt;code&gt;target/&lt;/code&gt; directory (with Maven property substitution), and then declare the plugin &lt;em&gt;without any configuration&lt;/em&gt;.
See my &lt;a href="https://ro14nd.de/simple-dockerfile-mode-dmp" target="_blank" rel="noreferrer"&gt;other blog post&lt;/a&gt; for a short description of how it works.&lt;/p&gt;
&lt;p&gt;BTW, the reason for the own XML syntax is a historical one. The plugin started in 2014 when Dockerfile was entirely unknown to Java developers. But Maven plugin XML configuration was (and still is) a well-known business. As time passed by and Docker become more and more popular for Java developers, the &lt;code&gt;Dockerfile&lt;/code&gt; syntax is well known now these days, too. So, I completely agree, that you should use Dockerfiles if possible, and that&amp;rsquo;s why the plugin supports Dockerfiles as a first-class citizen since the recent versions. The next step is to add similar support for &lt;code&gt;docker-compose.yml&lt;/code&gt; files for running containers. There is already docker compose support included, albeit a bit hidden.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I agree that multi-stage Docker builds are fantastic for generating reproducible builds, as the build tool (Maven) is used in a well-defined version. However, using a locally installed Maven during development has advantages, too. E.g. the local Maven repository avoids downloading artefacts over and over again, resulting in much faster build times and turnaround times. Of course, you can add caching to the mix for multi-stage builds, but then the setup gets more and more involved. Compare this to using a d-m-p for which you don&amp;rsquo;t even need a local Docker CLI installed, and you can &amp;lsquo;just start&amp;rsquo;. For CI builds this properly doesn&amp;rsquo;t matter much though (and that&amp;rsquo;s what the blog post is all about I guess).&lt;/p&gt;
&lt;p&gt;Other advantages of using fabric8&amp;rsquo;s d-m-p :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Running all your containers (app + deps) locally without the need of support from a CI system. As a side note, the custom compose-like syntax of codefresh&amp;rsquo;s CI is not so much different to the custom configuration syntax of fabric8&amp;rsquo;s d-m-p. It&amp;rsquo;s custom.&lt;/li&gt;
&lt;li&gt;Extended authentication support against various registries (Amazon ECR, Google GCR, &amp;hellip;)&lt;/li&gt;
&lt;li&gt;Automatic rebuilds during development with &lt;code&gt;docker:watch&lt;/code&gt; which increase turnaround times tremendously&lt;/li&gt;
&lt;li&gt;Download support files (e.g. startup scripts) automatically by just declaring a dependency in the plugin (blog post pending)&lt;/li&gt;
&lt;li&gt;&amp;hellip;. and even more stuff.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the end, your mileage may vary, but having an article conclusion without really trying to compare pros and cons of both approaches is far too biased for me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update: Kostis replied to my comment, and an interesting discussion is going over &lt;a href="https://codefresh.io/howtos/using-docker-maven-maven-docker/#comment-159" target="_blank" rel="noreferrer"&gt;there&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>When a Dockerfile is just good enough</title><link>https://ro14nd.de/simple-dockerfile-mode-dmp/</link><pubDate>Thu, 12 Apr 2018 00:00:00 +0000</pubDate><guid>https://ro14nd.de/simple-dockerfile-mode-dmp/</guid><description>&lt;p&gt;As you might know, one of my Open Source babies is the one and only &lt;a href="https://github.com/fabric8io/docker-maven-plugin/" target="_blank" rel="noreferrer"&gt;fabric8io/docker-maven-plugin&lt;/a&gt; (d-m-p).
If you already use this Maven plugin, you know, that it is super powerful and flexible to configure.
This flexibility comes at a price so that the configuration can become quite complicated.
Now, if you only want to &lt;em&gt;build&lt;/em&gt; Docker images with Maven, I have good news:
Since 0.25.1 d-m-p supports a zero XML configuration mode, the so-called &lt;a href="https://dmp.fabric8.io/#simple-dockerfile-build" target="_blank" rel="noreferrer"&gt;Simple Dockerfile Build&lt;/a&gt; mode.&lt;/p&gt;
&lt;p&gt;The idea of this mode started with a Twitter discussion:&lt;/p&gt;
&lt;img src="https://ro14nd.de/images/simple-dockerfile-mode-dmp/maven-dmp-tweet.png" class="shadow center"/&gt;
&lt;p&gt;And actually, it&amp;rsquo;s true: If all that you want is to build a single Docker image from a Dockerfile, then the initial configuration is indeed too complex.&lt;/p&gt;
&lt;p&gt;d-m-p already supports &lt;a href="https://dmp.fabric8.io/#external-dockerfile" target="_blank" rel="noreferrer"&gt;plain Dockerfiles&lt;/a&gt; for quite some time, and that even for multiple images.
However, you still have to reference those Dockerfiles in the XML configuration of the plugin.&lt;/p&gt;
&lt;p&gt;Since 0.25.1 you can now use the so-called &lt;a href="https://dmp.fabric8.io/#simple-dockerfile-build" target="_blank" rel="noreferrer"&gt;Simple Dockerfile Build&lt;/a&gt; mode (kudos go to Rohan Kumar for the initial &lt;a href="https://github.com/fabric8io/docker-maven-plugin/pull/969" target="_blank" rel="noreferrer"&gt;implementation&lt;/a&gt;).
All you have to do is to add d-m-p to your &lt;code&gt;pom.xml&lt;/code&gt; and add a Dockerfile.
The smallest possible Maven project for creating a Docker image consists of this &lt;code&gt;pom.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;project&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;modelVersion&amp;gt;&lt;/span&gt;4.0.0&lt;span style="color:#f92672"&gt;&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;fabric8&lt;span style="color:#f92672"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;smallest&lt;span style="color:#f92672"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;1-SNAPSHOT&lt;span style="color:#f92672"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;build&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;plugins&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;io.fabric8&lt;span style="color:#f92672"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;docker-maven-plugin&lt;span style="color:#f92672"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;0.26.0&lt;span style="color:#f92672"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;/plugins&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;/build&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and a &lt;code&gt;Dockerfile&lt;/code&gt; alongside this pom:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-dockerfile" data-lang="dockerfile"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; &lt;span style="color:#e6db74"&gt;busybox&lt;/span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CMD&lt;/span&gt; [&lt;span style="color:#e6db74"&gt;&amp;#34;echo&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;Hello&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;world!&amp;#34;&lt;/span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This image does not really much.
With &lt;code&gt;mvn docker:build&lt;/code&gt; you can build it, with &lt;code&gt;docker run fabric8/smallest&lt;/code&gt; you can test it.
Or use &lt;code&gt;mvn docker:run&lt;/code&gt; so that you even don&amp;rsquo;t have to provide the image name.&lt;/p&gt;
&lt;p&gt;A more realistic Dockerfile could look like&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-dockerfile" data-lang="dockerfile"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; &lt;span style="color:#e6db74"&gt;openjdk:jre&lt;/span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ARG&lt;/span&gt; jar&lt;span style="color:#f92672"&gt;=&lt;/span&gt;target/app-1.0.0-SNAPSHOT.jar&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ADD&lt;/span&gt; $jar /app.jar&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CMD&lt;/span&gt; java -cp /app.jar HelloWorld&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;where we define &lt;code&gt;jar&lt;/code&gt; as &lt;a href="https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg" target="_blank" rel="noreferrer"&gt;build arg&lt;/a&gt; in the Dockerfile but also as property in the &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;jar&amp;gt;&lt;/span&gt;${project.build.directory}/${project.build.finalName}.jar&lt;span style="color:#f92672"&gt;&amp;lt;/jar&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;You can use Maven properties in the Dockerfile which get automatically replaced by &lt;code&gt;docker:build&lt;/code&gt; when creating the image.
But you can use that Dockerfile also without Maven with &lt;code&gt;docker build .&lt;/code&gt;
You can&amp;rsquo;t use Maven properties with &lt;code&gt;.&lt;/code&gt; directly as dots are not allowed in Docker build args, therefore we use an extra property.
However, a maven-less usage probably does not make much sense when you don&amp;rsquo;t also build the artefacts.
The full example can be found in the &lt;a href="https://github.com/fabric8io/docker-maven-plugin/tree/master/samples/zero-config" target="_blank" rel="noreferrer"&gt;dmp GitHub repo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you can forgo Docker build args you can use predefined Maven properties directly:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-dockerfile" data-lang="dockerfile"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; &lt;span style="color:#e6db74"&gt;openjdk:jre&lt;/span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ADD&lt;/span&gt; &lt;span style="color:#e6db74"&gt;${&lt;/span&gt;project.build.directory&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;/&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;project.build.finalName&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;.jar /app.jar&lt;span style="color:#960050;background-color:#1e0010"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;CMD&lt;/span&gt; java -cp /app.jar HelloWorld&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The image name is auto-generated, but you can set this name also by yourself by setting the property &lt;code&gt;docker.name&lt;/code&gt; (and you can use &lt;a href="https://dmp.fabric8.io/#image-name-placeholders" target="_blank" rel="noreferrer"&gt;placeholders&lt;/a&gt; within this name)&lt;/p&gt;
&lt;p&gt;You can even start the container with &lt;code&gt;mvn docker:run&lt;/code&gt; although without any additional configuration (e.g. like port mappings).
Also, you can &lt;code&gt;docker:push&lt;/code&gt; the image.&lt;/p&gt;
&lt;p&gt;You can still configure certain aspects like authentication or bind d-m-p goals to default lifecycle phases.
Using this mode is very similar to the functionality offered by &lt;a href="https://github.com/spotify/dockerfile-maven" target="_blank" rel="noreferrer"&gt;spotify/dockerfile-maven&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you need more horsepower, you can gradually expand on this simple setup.
Features which are waiting to be discovered are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Setup of multiple images for running integration tests&lt;/li&gt;
&lt;li&gt;Custom networks and volumes for your tests&lt;/li&gt;
&lt;li&gt;Using docker-compose files for running the containers directly from the plugin&lt;/li&gt;
&lt;li&gt;Exporting the Docker image as an archive&lt;/li&gt;
&lt;li&gt;Watch docker containers and restart them when the code changes&lt;/li&gt;
&lt;li&gt;All can be configured via properties, too and since with the latest versions, you can mix it with XML configuration.&lt;/li&gt;
&lt;li&gt;&amp;hellip;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are interested in more to find out, then please have a look at the &lt;a href="https://dmp.fabric8.io/" target="_blank" rel="noreferrer"&gt;reference manual&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m curious what you think about this new mode.
Please use the comments below if you want to leave some feedback.
In fact, there are concrete plans for d-m-p to include the &lt;a href="https://maven.fabric8.io/#generators" target="_blank" rel="noreferrer"&gt;generators&lt;/a&gt; from the fabric8-maven-plugin functionality of autodetecting the tech stacks used for creating opinionated Docker images.&lt;/p&gt;</description></item><item><title>docker-maven-plugin moves on</title><link>https://ro14nd.de/dmp-moves-on/</link><pubDate>Wed, 24 Feb 2016 00:00:00 +0000</pubDate><guid>https://ro14nd.de/dmp-moves-on/</guid><description>&lt;p&gt;&lt;strong&gt;rhuss/docker-maven-plugin&lt;/strong&gt; is dead, long live &lt;strong&gt;fabric8io/docker-maven-plugin&lt;/strong&gt; !&lt;/p&gt;
&lt;p&gt;If you follow the Docker Maven Plugin Scene&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, you probably noticed that there has been quite some progress in the last year. Started as a personal research experiment early 2014, &lt;a href="https://github.com/fabric8io/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;rhuss/docker-maven-plugin&lt;/a&gt; (d-m-p) has took off a little bit. With more than 300 GitHub stars it&amp;rsquo;s now the second most popular docker-maven-plugin. With 38 contributors we were able to do 36 releases. It is really fantastic to see that many people contributing to a rather niche product. Many kudos go out to &lt;a href="https://github.com/jgangemi" target="_blank" rel="noreferrer"&gt;Jae&lt;/a&gt; for his many contributions and continued support on fixing and answering issues. Thanks also for always being very patient with my sometimes quite opinionated and picky code reviews :)&lt;/p&gt;
&lt;p&gt;However it is now time to ignite the next stage and bring this personal &amp;lsquo;pet&amp;rsquo; project to a wider context. And what is better suited here than the fabric8 community ?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://fabric8.io" target="_blank" rel="noreferrer"&gt;Fabric8&lt;/a&gt; is a next generation DevOps and integration platform for Docker based applications, with a focus on &lt;a href="http://kubernetes.io/" target="_blank" rel="noreferrer"&gt;Kubernetes&lt;/a&gt; and &lt;a href="https://www.openshift.com/" target="_blank" rel="noreferrer"&gt;OpenShift&lt;/a&gt; as orchestration and build infrastructure. Its a collection of multiple interrelated projects including Maven tooling for interacting with Kubernetes and OpenShift. d-m-p is already included as foundation for creating Docker application images.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m very happy that d-m-p has now found its place in this ecosystem where it will continue to flourish even faster.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://fabric8.io/community/index.html" target="_blank" rel="noreferrer"&gt;fabric8 community&lt;/a&gt; is very open and has established multiple communications channels on which you will find d-m-p now, too:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;#fabric8&lt;/code&gt; on &lt;code&gt;irc.freenode.net&lt;/code&gt; is an IRC channel with a lot of helpful hands (including myself)&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://groups.google.com/forum/#!forum/fabric8" target="_blank" rel="noreferrer"&gt;mailing list&lt;/a&gt; for more in depth discussions&lt;/li&gt;
&lt;li&gt;Issues are still tracked with &lt;a href="https://github.com/fabric8io/docker-maven-plugin/issues" target="_blank" rel="noreferrer"&gt;GitHub issues&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;d-m-p specific blog posts will go out on the &lt;a href="https://blog.fabric8.io/" target="_blank" rel="noreferrer"&gt;fabric8 blog&lt;/a&gt; in the future.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, what changed ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;rhuss/docker-maven-plugin&lt;/code&gt; has been transferred to &lt;a href="https://github.com/fabric8io/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;fabric8io/docker-maven-plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The Maven group id has changed from &lt;code&gt;org.jolokia&lt;/code&gt; to &lt;code&gt;io.fabric8&lt;/code&gt; for all releases 0.14.0 and later.&lt;/li&gt;
&lt;li&gt;CI and release management will be done on the fabric8 platform.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And what will &lt;strong&gt;not&lt;/strong&gt; change ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;d-m-p will always be usable with plain Docker, speaking either to a remote or local Docker daemon. No Kubernetes, no OpenShift required.&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ll continue to work on d-m-p ;-)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks so much for all the fruitful feedback and pull requests. Keep on rocking ;-)&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;with more than 15 &lt;code&gt;docker-maven-plugin&lt;/code&gt;s its probably fair to call it a &amp;ldquo;scene&amp;rdquo; ;-)&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Registry Magic with docker-maven-plugin</title><link>https://ro14nd.de/registry-magic-with-dmp/</link><pubDate>Thu, 21 Jan 2016 00:00:00 +0000</pubDate><guid>https://ro14nd.de/registry-magic-with-dmp/</guid><description>&lt;p&gt;Dealing with multiple Docker registries is hard, mostly because the meta information where a image is located is part of a Docker image&amp;rsquo;s name, which is typically used as an identifier, too.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how the &lt;a href="https://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;rhuss/docker-maven-plugin&lt;/a&gt; deals with this peculiarity.&lt;/p&gt;
&lt;p&gt;When setting up a Maven build for creating Docker images out of your Java application, the classical way to specify the registry where to push the final Docker image is to bake it into the image&amp;rsquo;s name. The drawback however is that you couple your build to this particular registry so that it is not possible to push your image to another registry when building the image.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Pull and Push
 &lt;div id="pull-and-push" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#pull-and-push" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The &lt;a href="https://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;docker-maven-plugin&lt;/a&gt; (&lt;code&gt;d-m-p&lt;/code&gt; in short) interacts&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; with Docker registries in two use cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pulling&lt;/strong&gt; base images from a registry when building images with &lt;code&gt;docker:build&lt;/code&gt; or starting images with &lt;code&gt;docker:start&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pushing&lt;/strong&gt; built images to a registry with &lt;code&gt;docker:push&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In both cases you can define your build agnostic from any registry by omitting the registry part in your image names&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; and specify it externally as meta information. This can be done in various ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding it to the plugin configuration as an &lt;code&gt;&amp;lt;registry&amp;gt;&lt;/code&gt; element. This can be easily put into a Maven profile (either directly in the &lt;code&gt;pom.xml&lt;/code&gt; or also in &lt;code&gt;~/.m2/settings.xml&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Using a system property &lt;code&gt;docker.registry&lt;/code&gt; when running Maven&lt;/li&gt;
&lt;li&gt;As a final fallback an environment variable &lt;code&gt;DOCKER_REGISTRY&lt;/code&gt; can be used, too.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mvn -Ddocker.registry=myregistry.domain.com:5000 docker:push
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When you combine build and push steps in a single call like in&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mvn package docker:build docker:push
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;a pull operation for a base image and a push operation can happen. To allow different registries in this situation the properties &lt;code&gt;docker.pull.registry&lt;/code&gt; and &lt;code&gt;docker.push.registry&lt;/code&gt; are supported, too, (with the corresponding configuration elements &lt;code&gt;&amp;lt;pullRegistry&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;pushRegistry&amp;gt;&lt;/code&gt;, respectively).&lt;/p&gt;
&lt;p&gt;When pushing an image this way, the following happens behind the scene (assuming an image named &lt;code&gt;user/myimage&lt;/code&gt; and target registry &lt;code&gt;myregistry:5000&lt;/code&gt;)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The image &lt;code&gt;user/myimage&lt;/code&gt; is tagged temporarily as &lt;code&gt;myregistry:5000/user/myimage&lt;/code&gt; in the Docker daemon.&lt;/li&gt;
&lt;li&gt;The image &lt;code&gt;myregistry:5000/user/myimage&lt;/code&gt; is pushed.&lt;/li&gt;
&lt;li&gt;The tag is removed again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Authentication
 &lt;div id="authentication" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#authentication" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;That&amp;rsquo;s all fine, but how does d-m-p deal with authentication ? Again, there are several possibilities how authentication can be performed against a registry:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using a &lt;code&gt;&amp;lt;authConfig&amp;gt;&lt;/code&gt; section in the plugin configuration with&lt;code&gt;&amp;lt;username&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;password&amp;gt;&lt;/code&gt; elements.&lt;/li&gt;
&lt;li&gt;Providing system properties &lt;code&gt;docker.username&lt;/code&gt; and &lt;code&gt;docker.password&lt;/code&gt; when running Maven&lt;/li&gt;
&lt;li&gt;Using a &lt;code&gt;&amp;lt;server&amp;gt;&lt;/code&gt; configuration in &lt;code&gt;~/.m2/settings.xml&lt;/code&gt; with possible encrypted password. That&amp;rsquo;s the most maven-ish way for doing authentication.&lt;/li&gt;
&lt;li&gt;Login into the registry with &lt;code&gt;docker login&lt;/code&gt;. The plugin will pick up the credentials from &lt;code&gt;~/.docker/config.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are again variants to distinguish between authentication for pulling and pushing images to registries (e.g. &lt;code&gt;docker.push.username&lt;/code&gt; and &lt;code&gt;docker.push.password&lt;/code&gt;). All the details can be found in the &lt;a href="http://ro14nd.de/docker-maven-plugin/authentication.html" target="_blank" rel="noreferrer"&gt;reference manual&lt;/a&gt;.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Using the OpenShift Registry
 &lt;div id="using-the-openshift-registry" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#using-the-openshift-registry" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://www.openshift.com/" target="_blank" rel="noreferrer"&gt;OpenShift&lt;/a&gt; is an awesome PaaS platform on top of &lt;a href="http://kubernetes.io/" target="_blank" rel="noreferrer"&gt;Kubernetes&lt;/a&gt;. It comes with an &lt;a href="https://docs.openshift.com/enterprise/latest/install_config/install/docker_registry.html" target="_blank" rel="noreferrer"&gt;own Docker registry&lt;/a&gt; which can be used by d-m-p, too. However, there are some things to watch out for.&lt;/p&gt;
&lt;p&gt;First of all, the registry needs to be exposed to the outside so that a Docker daemon outside the OpenShift cluster can talk with the registry:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;oc expose service/docker-registry --hostname=docker-registry.mydomain.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The hostname provided should be resolved by your host to the OpenShift API server&amp;rsquo;s IP (this happens automatically if you use the &lt;a href="http://fabric8.io/guide/getStarted/vagrant.html" target="_blank" rel="noreferrer"&gt;fabric8 OpenShift Vagrant image&lt;/a&gt; for a one-node developer installation of OpenShift).&lt;/p&gt;
&lt;p&gt;Next, it is important to know, that the OpenShift registry use the regular OpenShift SSO authentication, so you have to login into OpenShift before you can push to the registry. The access token obtained from the login is then used as the password for accessing the registry:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Login to OpenShift. Credentials are stored in ~/.kube/config.json:
oc login

# Use user and access token for authentication:
mvn docker:push -Ddocker.registry=docker-registry.mydomain.com \
 -Ddocker.username=$(oc whoami) \
 -Ddocker.password=$(oc whoami -t)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The last step can be simplified by using &lt;code&gt;-Ddocker.useOpenShiftAuth&lt;/code&gt; which does the user and token lookup transparently.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mvn docker:push -Ddocker.registry=docker-registry.mydomain.com \
 -Ddocker.useOpenShiftAuth
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The configuration option &lt;code&gt;useOpenShiftAuth&lt;/code&gt; again comes in multiple flavours: a default one, and dedicated for push and pull operations (&lt;code&gt;docker.pull.useOpenShiftAuth&lt;/code&gt; and &lt;code&gt;docker.push.useOpenShiftAuth&lt;/code&gt;).&lt;/p&gt;

&lt;h3 class="relative group"&gt;tl;dr
 &lt;div id="tldr" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#tldr" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Among all the &lt;a href="https://github.com/search?utf8=%E2%9C%93&amp;amp;q=docker-maven-plugin" target="_blank" rel="noreferrer"&gt;many docker maven plugins&lt;/a&gt;, &lt;a href="https://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;rhuss/docker-maven-plugin&lt;/a&gt; provides the most flexible options for accessing Docker registries and authentication. The gory details can be found in the &lt;a href="http://ro14nd.de/docker-maven-plugin/" target="_blank" rel="noreferrer"&gt;reference manual&lt;/a&gt; which documents &lt;a href="http://ro14nd.de/docker-maven-plugin/" target="_blank" rel="noreferrer"&gt;registry handling&lt;/a&gt; and &lt;a href="http://ro14nd.de/docker-maven-plugin/authentication.html" target="_blank" rel="noreferrer"&gt;authentication&lt;/a&gt; in detail.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;The interaction is always indirectly via the Docker daemon, since a Docker client like d-m-p only talks with the Docker daemon directly.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Of course you can the registry part in your image names in which case this registry has always the highest priority.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>fish-pepper - Docker on Capsaicin</title><link>https://ro14nd.de/fish-pepper-announcement/</link><pubDate>Mon, 07 Sep 2015 00:00:00 +0000</pubDate><guid>https://ro14nd.de/fish-pepper-announcement/</guid><description>&lt;p&gt;When I had to create multiple Docker base images which only differ slightly for some minor variations I couldn&amp;rsquo;t avoid to feel quite dirty because of all the copying &amp;amp; pasting of Dockerfile fragments. We all know how this smells, but unfortunately Docker has only an answer for &lt;strong&gt;inheritance&lt;/strong&gt; but not for &lt;strong&gt;composition&lt;/strong&gt; of Docker images. Luckily there is now &lt;a href="https://github.com/fabric8io/fish-pepper" target="_blank" rel="noreferrer"&gt;fish-pepper&lt;/a&gt;, a multi-dimensional docker build generator, which steps into the breach.&lt;/p&gt;
&lt;p&gt;For example consider a Java base image: Some users might require Java 7, some want Java 8. For running Microservices a JRE might be sufficient. In other use cases you need a full JDK. These four variants are all quite similar with respect to documentation, Dockerfiles and support files like startup scripts. Copy-and-paste might seem to work for the initial setup but there are severe drawbacks considering image evolution or introduction of even more parameters.&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;fish-pepper&lt;/code&gt; you can use flexible templates which are filled with variations of the base image (like &lt;code&gt;'version' : ['java7', 'java8'], 'type': ['jdk', 'jre']&lt;/code&gt;) and which will create multiple, similar Dockerfile builds.&lt;/p&gt;
&lt;p&gt;The main configuration of an image family is &lt;code&gt;images.yml&lt;/code&gt; which defines the possible parameters. For the example above it is&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fish-pepper:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; params:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &amp;#34;version&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &amp;#34;type&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The possible values for these parameters are given in a dedicated &lt;code&gt;config&lt;/code&gt; section:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;config:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; version:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; openjdk7:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; java: &amp;#34;java:7u79&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fullVersion: &amp;#34;OpenJDK 1.7.0_79&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; openjdk8:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; java: &amp;#34;java:8u45&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; fullVersion: &amp;#34;OpenJDK 1.8.0_45&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; type:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; jre:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; extension: &amp;#34;-jre&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; jdk:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; extension: &amp;#34;-jdk&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Given this configuration, four builds will be generated when calling &lt;code&gt;fish-pepper&lt;/code&gt;, one for each combination of &lt;em&gt;version&lt;/em&gt; (&amp;ldquo;openjdk7&amp;rdquo; and &amp;ldquo;openjdk8&amp;rdquo;) and &lt;em&gt;type&lt;/em&gt; (&amp;ldquo;jre&amp;rdquo; and &amp;ldquo;jdk&amp;rdquo;) parameter values.&lt;/p&gt;
&lt;p&gt;These value can now be filled into templates which are stored in a &lt;code&gt;templates/&lt;/code&gt; directory. The &lt;code&gt;Dockerfile&lt;/code&gt; in this directory can refer to this configuration through a context object &lt;code&gt;fp&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FROM {{ &amp;#34;{{= fp.config.version.java + fp.config.type.extension &amp;#34; }}}}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.....&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Templates use &lt;a href="http://olado.github.io/doT/index.html" target="_blank" rel="noreferrer"&gt;DoT.js&lt;/a&gt; as template engine, so that the full expressiveness of JavaScript is available. The fish-pepper &lt;a href="https://github.com/fabric8io/fish-pepper#template-context" target="_blank" rel="noreferrer"&gt;context object&lt;/a&gt; &lt;code&gt;fp&lt;/code&gt; holds the configuration and more.&lt;/p&gt;
&lt;p&gt;The given configuration will lead to four Docker build directories:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;images/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; +---- openjdk7
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; | +--- jre -- Dockerfile, ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; | +--- jdk -- Dockerfile, ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; |
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; +---- opendjk8
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; +--- jre -- Dockerfile, ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; +--- jdk -- Dockerfile, ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The generated build files can also be used directly to create the images with &lt;code&gt;fish-pepper build&lt;/code&gt;. This will reach out to a Docker daemon and create the images &lt;code&gt;java-openjdk7-jre&lt;/code&gt;, &lt;code&gt;java-openjdk7-jdk&lt;/code&gt;, &lt;code&gt;java-openjdk8-jre&lt;/code&gt; and &lt;code&gt;java-openjdk8-jdk&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively these builds can be used as content for automated Docker Hub builds when checked into Github. The full example can be found on &lt;a href="https://github.com/fabric8io/fish-pepper/tree/master/example" target="_blank" rel="noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But wait, there is more:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/fabric8io/fish-pepper#blocks" target="_blank" rel="noreferrer"&gt;Blocks&lt;/a&gt; can be used to reuse Dockerfile snippets and files to include across images. Blocks can be stored locally or referenced via a remote Git repository. Examples for blocks are generic &lt;a href="https://github.com/fabric8io/run-java-sh/tree/master/fish-pepper/run-java-sh" target="_blank" rel="noreferrer"&gt;startup scripts&lt;/a&gt; or other value add functionality like enabling agents like &lt;a href="https://github.com/fabric8io/agent-bond/tree/master/fish-pepper/agent-bond" target="_blank" rel="noreferrer"&gt;agent bond&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Flexible &lt;a href="https://github.com/fabric8io/fish-pepper#file-mappings" target="_blank" rel="noreferrer"&gt;file mappings&lt;/a&gt; allow multiple alternative templates.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/fabric8io/fish-pepper#defaults" target="_blank" rel="noreferrer"&gt;Defaults&lt;/a&gt; allow shared configuration between multiple parameter values.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;fish-pepper can be seen in its fully beauty in &lt;a href="https://github.com/fabric8io/base-images" target="_blank" rel="noreferrer"&gt;fabric8io/base-images&lt;/a&gt; where more than twenty five base images are maintained with fish-pepper.&lt;/p&gt;
&lt;p&gt;With node.js you can install fish-pepper super easy with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm -g install fish-pepper
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the following blogs I will show more usage examples, especially how &amp;ldquo;blocks&amp;rdquo; can be easily reused and shared.&lt;/p&gt;</description></item><item><title>Jmx4Perl for everyone</title><link>https://ro14nd.de/jmx4perl-docker/</link><pubDate>Tue, 28 Jul 2015 00:00:00 +0000</pubDate><guid>https://ro14nd.de/jmx4perl-docker/</guid><description>&lt;p&gt;As you might know, &lt;a href="http://www.jmx4perl.org" target="_blank" rel="noreferrer"&gt;Jmx4Perl&lt;/a&gt; is the mother of &lt;a href="https://jolokia.org/" target="_blank" rel="noreferrer"&gt;Jolokia&lt;/a&gt;. But what might be not so known is, that Jmx4Perl provides a set of nice CLI tools for accessing Jolokia agents. However, installing Jmx4Perl manually is cumbersome because of its many Perl and also native dependencies.&lt;/p&gt;
&lt;p&gt;However, if you are a Docker user there is now a super easy way to benefit from this gems.&lt;/p&gt;
&lt;p&gt;Even if Perl is not your cup of tea, you might like the following tool (for which of course no Perl knowledge is required at all):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://search.cpan.org/~roland/jmx4perl/scripts/jmx4perl" target="_blank" rel="noreferrer"&gt;&lt;strong&gt;jmx4perl&lt;/strong&gt;&lt;/a&gt; is a command line tool for one-shot querying Jolokia agents. It is perfectly suited for shell scripts.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://search.cpan.org/~roland/jmx4perl/scripts/j4psh" target="_blank" rel="noreferrer"&gt;&lt;strong&gt;j4psh&lt;/strong&gt;&lt;/a&gt; is a readline based, JMX shell with coloring and command line completion. You can navigate the JMX namespace like directories with &lt;code&gt;cd&lt;/code&gt; and &lt;code&gt;ls&lt;/code&gt;, read JMX attributes with &lt;code&gt;cat&lt;/code&gt; and execute operations with &lt;code&gt;exec&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://search.cpan.org/~roland/jmx4perl/scripts/jolokia" target="_blank" rel="noreferrer"&gt;&lt;strong&gt;jolokia&lt;/strong&gt;&lt;/a&gt; is an agent management tool which helps you in downloading Jolokia agents of various types (war, jvm, osgi, mule) and versions. It also knows how to repackage agents e.g. for enabling security for the war agent by in-place modification of the web.xml descriptor.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://search.cpan.org/~roland/jmx4perl/scripts/check_jmx4perl" target="_blank" rel="noreferrer"&gt;&lt;strong&gt;check_jmx4perl&lt;/strong&gt;&lt;/a&gt; is a full featured Nagios plugin.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How can you now use these tools ? All you need is a running Docker installation. The tools mentioned above are all included within the Docker image &lt;a href="https://registry.hub.docker.com/u/jolokia/jmx4perl/" target="_blank" rel="noreferrer"&gt;jolokia/jmx4perl&lt;/a&gt; which is available from Docker Hub.&lt;/p&gt;
&lt;p&gt;Some examples:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# Get some basic information of the server
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker run --rm -it jolokia/jmx4perl \
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; jmx4perl http://localhost:8080/jolokia
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# Download the current jolokia.war agent
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker run --rm -it -v `pwd`:/jolokia jolokia/jmx4perl \
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; jolokia
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# Start an interactive JMX shell
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# server &amp;#34;tomcat&amp;#34; is defined in ~/.j4p/jmx4perl.config
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker run --rm -it -v ~/.j4p:/root/.j4p jolokia/jmx4perl \
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; j4psh tomcat&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In these examples we mounted some volumes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you put your server definitions into &lt;code&gt;~/.j4p/jmx4perl.config&lt;/code&gt; you can use them by mounting this directory as volume with &lt;code&gt;-v ~/.j4p:/root/.j4p&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;For the management tool &lt;code&gt;jolokia&lt;/code&gt; it is recommended to mount the local directory with &lt;code&gt;-v $(pwd):/jolokia&lt;/code&gt; so that downloaded artefacts are stored in the current host directory. (Note for boot2docker users: This works only when you are in a directory below you home directory)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is recommended to use aliases as abbreviations:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;alias jmx4perl=&amp;#34;docker run --rm -it -v ~/.j4p:/root/.j4p jolokia/jmx4perl jmx4perl&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;alias jolokia=&amp;#34;docker run --rm -it -v `pwd`:/jolokia jolokia/jmx4perl jolokia&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;alias j4psh=&amp;#34;docker run --rm -it -v ~/.j4p:/root/.j4p jolokia/jmx4perl j4psh&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;As an additional benefit of using Jmx4Perl that way, you can access servers which are not directly reachable by you. The Jolokia agent must be reachable by the Docker daemon only. For example, you can communicate with a SSL secured Docker daemon running in a DMZ only. From there you can easily reach any other server with a Jolokia agent installed, so there is no need to open access to all servers from your local host directly.&lt;/p&gt;
&lt;p&gt;Finally, here&amp;rsquo;s a short appetiser with an (older) demo showing &lt;code&gt;j4psh&lt;/code&gt; in action.&lt;/p&gt;
&lt;iframe width="720" height="405" src="https://www.youtube.com/embed/y9TuGzxD2To" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;</description></item><item><title>docker:watch</title><link>https://ro14nd.de/maven-docker-watch/</link><pubDate>Tue, 30 Jun 2015 00:00:00 +0000</pubDate><guid>https://ro14nd.de/maven-docker-watch/</guid><description>&lt;p&gt;Ok, you know Docker. And since you are a Java developer you want to know how you can use this in your daily development workflow. You probably also heard about &lt;em&gt;the&lt;/em&gt; &lt;a href="https://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;docker-maven-plugin&lt;/a&gt; which seamlessly creates Docker images, starts and stops Docker containers and more all with a concise configuration syntax.&lt;/p&gt;
&lt;p&gt;And now there is this new goal &lt;code&gt;docker:watch&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We developers are lazy, right ? We want our code to compile fast, we want the servers to start up fast. And we want to test changes quickly. That&amp;rsquo;s why we love &lt;a href="http://www.osgi.org/Main/HomePage" target="_blank" rel="noreferrer"&gt;OSGi&lt;/a&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; and &lt;a href="http://zeroturnaround.com/software/jrebel/" target="_blank" rel="noreferrer"&gt;JRebel&lt;/a&gt;. And we want this for Docker containers, too.&lt;/p&gt;
&lt;p&gt;Good news. &lt;a href="https://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;docker-maven-plugin&lt;/a&gt; will support hot rebuild of Docker images and hot restart of containers with a new Maven goal &lt;code&gt;docker:watch&lt;/code&gt;. It will be released with version 0.12.1. For the brave coder 0.12.1-SNAPSHOT is already out there, the documentation can be found &lt;a href="https://github.com/rhuss/docker-maven-plugin/blob/integration/doc/manual.md#dockerwatch" target="_blank" rel="noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But before losing more words, here&amp;rsquo;s a sneak preview.&lt;/p&gt;
&lt;iframe src="https://player.vimeo.com/video/132183699" width="720" height="405" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;That&amp;rsquo;s of course not entirely true. We love OSGi &amp;hellip; or we hate it with passion. But even the haters don&amp;rsquo;t hate it for its hot deployment abilities.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>The Docker Wormhole Pattern</title><link>https://ro14nd.de/docker-wormhole-pattern/</link><pubDate>Wed, 17 Jun 2015 00:00:00 +0000</pubDate><guid>https://ro14nd.de/docker-wormhole-pattern/</guid><description>&lt;p&gt;Building a Docker wormhole is easy.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;A wormhole is a special type of structure that some scientists think might exist, connecting parts of space and time that are not usually connected&lt;/p&gt;
&lt;p&gt;&amp;mdash; Cambridge Dictionaries Online&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;In Docker universe we have several uses cases, which require a Docker installation within a Docker container. For example the &lt;a href="https://github.com/openshift/origin/blob/master/docs/builds.md#openshift-builds" target="_blank" rel="noreferrer"&gt;OpenShift Builds&lt;/a&gt; use images whose container&amp;rsquo;s are meant to create application images. They include a whole development environment including possibly a compiler and a build tool. During the build a Docker daemon is accessed for creating the final application image.&lt;/p&gt;
&lt;p&gt;The question is now, &lt;em&gt;how&lt;/em&gt; a build can access the Docker daemon ? In general, there are two possibilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/jpetazzo/dind" target="_blank" rel="noreferrer"&gt;Docker in Docker&lt;/a&gt; is a project which allows you to run a Docker daemon within a Docker container. Technically this is quite tricky and there seems to be some issues with this approach, especially because you have to run this container in &lt;a href="http://blog.docker.com/2013/09/docker-can-now-run-within-docker/" target="_blank" rel="noreferrer"&gt;privileged mode&lt;/a&gt;. This is the &lt;strong&gt;Matryoshka doll pattern&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Or you use the &lt;strong&gt;Wormhole pattern&lt;/strong&gt; described in this post. The idea is to get access to the Docker daemon running a container from within the container.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you know a Docker host can be configured to be accessible by two alternative methods: Via a Unix socket or via a TCP socket.&lt;/p&gt;
&lt;p&gt;Using the Unix socket of the surrounding docker daemon is easy: Simply share the path to the unix socket as a volume:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Map local unix socket into the container
docker run -it -v /var/run/docker.sock:/var/run/docker.sock ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then within the container you can use the Docker CLI or any tool that uses the Unix socket at usual.&lt;/p&gt;
&lt;p&gt;Running over the TCP socket is a bit more tricky because you have to find out the address of your Docker daemon host. This can best be done by examining the routing table within the container:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Lookup and parse routing table 
host=$(ip route show 0.0.0.0/0 | \
 grep -Eo 'via \S+' | \
 awk '{print $2}');
export DOCKER_HOST=tcp://${host}:2375
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This works fine as long you are not using SSL. With SSL in place you need have access to the SSL client certificates. Of course this is achieved again with a volume mount. Assuming that you are using boot2docker this could look like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Mount certs into the container
docker run -ti -v ~/.boot2docker/certs/boot2docker-vm/:/certs ....
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will mount your certs at &lt;code&gt;/certs&lt;/code&gt; within the container and can be used to set the &lt;code&gt;DOCKER_HOST&lt;/code&gt; variable.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if [ -f /certs/key.pem ]; then
 # If certs are mounted, use SSL ...
 export DOCKER_CERT_PATH=/certs
 export DOCKER_TLS_VERIFY=1
 export DOCKER_HOST=tcp://${host}:2376
else
 # ... otherwise use plain http
 export DOCKER_TLS_VERIFY=0
 export DOCKER_HOST=tcp://${host}:2375
fi
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There is some final gotcha as that the server certificate can not be verified because it doesn&amp;rsquo;t contain the docker host IP as seen from the container. See this &lt;a href="https://github.com/docker/docker/issues/13922" target="_blank" rel="noreferrer"&gt;issue&lt;/a&gt; for details. As workaround you have to &lt;code&gt;unset DOCKER_TLS_VERIFY&lt;/code&gt; for the moment when using the docker client.&lt;/p&gt;
&lt;p&gt;Both ways are useful and are &lt;a href="https://github.com/openshift/origin/blob/master/docs/builds.md#why-not-docker-in-docker" target="_blank" rel="noreferrer"&gt;leaner and possibly more secure&lt;/a&gt; than having a Matryoshka doll approach.&lt;/p&gt;
&lt;p&gt;Finally there is still the question, why on earth &lt;em&gt;wormhole pattern&lt;/em&gt; ? Like in a wormhole (also known as &lt;a href="https://en.wikipedia.org/wiki/Wormhole" target="_blank" rel="noreferrer"&gt;Einstein-Rosen Bridge&lt;/a&gt;) you can reach through the wormhole a point (the outer docker daemon) in spacetime which is normally not reachable (because a container is supposed to be its &amp;ldquo;own&amp;rdquo; world). Another fun fact: If you create a container through a wormhole this container it&amp;rsquo;s not your daughter, its your sister. Feels a bit freaky, or ? Alternatively you could call it also &lt;strong&gt;Münchhausen pattern&lt;/strong&gt; because you create something with the exact the identically means you have been created yourself (like in the &lt;a href="https://en.wikipedia.org/wiki/M%C3%BCnchhausen_trilemma" target="_blank" rel="noreferrer"&gt;Münchhausen trilemma&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Or feel free to call it what you like ;-)&lt;/p&gt;</description></item><item><title>Real clean Maven builds with Docker</title><link>https://ro14nd.de/clean-maven-builds-with-docker/</link><pubDate>Fri, 07 Nov 2014 00:00:00 +0000</pubDate><guid>https://ro14nd.de/clean-maven-builds-with-docker/</guid><description>&lt;p&gt;A local Maven repository serves as a cache for artifacts and dependencies, we all know this. This helps in speeding up things but can cause subtle problems when doing releases. Docker can help here a bit for avoiding caching issues.&lt;/p&gt;
&lt;p&gt;Before doing a release I typically move &lt;code&gt;~/.m2/repository&lt;/code&gt; away to be really sure that everybody else can build the source as well and that any dependencies are also on the remote Maven repository. This is a bit tedious, because it is a manual process and you can forget to move the old directory back which will was a LOT of disk space over time.&lt;/p&gt;
&lt;p&gt;Docker can help here a bit: Since yesterday there is an &lt;a href="https://registry.hub.docker.com/_/maven/" target="_blank" rel="noreferrer"&gt;official Maven image&lt;/a&gt; which can be used to build your project. The nice thing for doing releases with this image is, that it always starts afresh with an empty local Maven repository.&lt;/p&gt;
&lt;p&gt;Assuming you are currently located in the top-level directory holding your &lt;code&gt;pom.xml&lt;/code&gt; you can use this single command for running a real clean build:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker run -it --rm \ 
	 -v &amp;quot;$(pwd)&amp;quot;:/usr/src/mymaven \ 
	 -w /usr/src/mymaven \ 
	 maven:3.2-jdk-7 \
	 mvn clean install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With this call you mount your project directory into &lt;code&gt;/usr/src/mymaven&lt;/code&gt; on the container, change to this directory in the container and call &lt;code&gt;mvn clean install&lt;/code&gt;. At the end, your container will be removed (&lt;code&gt;--rm&lt;/code&gt;) so there is no chance that you might forget to clean up afterwards.&lt;/p&gt;
&lt;p&gt;Of course it will download all the artifacts each time, so it is not a good idea to use this approach for your daily developer business (especially if you using Maven central as remote Maven repository).&lt;/p&gt;
&lt;p&gt;You can also play around with various versions of Maven by changing the image tag so at the end you can be really sure, that your project will build everywhere. Please refer to the &lt;a href="https://registry.hub.docker.com/_/maven/" target="_blank" rel="noreferrer"&gt;Docker Hub page&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: As pointed out by &lt;a href="https://twitter.com/noahlz/status/530708791906807808" target="_blank" rel="noreferrer"&gt;Noah Zucker&lt;/a&gt; on Twitter you can redirect of course the local repository via &lt;code&gt;-Dmaven.repo.local=/tmp/clean-repo&lt;/code&gt; temporarily to a new location. Which is confessedly much simpler and I would prefer that one instead if you don&amp;rsquo;t need to check with different JDKs or Maven versions. Sometimes you don&amp;rsquo;t see the forest for the trees if you come from the wrong direction (e.g. looking for use case of a specific docker image).&lt;/p&gt;</description></item><item><title>Docker maven plugin rewrite</title><link>https://ro14nd.de/docker-maven-plugin-rewrite/</link><pubDate>Mon, 13 Oct 2014 00:00:00 +0000</pubDate><guid>https://ro14nd.de/docker-maven-plugin-rewrite/</guid><description>&lt;p&gt;My &lt;a href="https://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;docker-maven-plugin&lt;/a&gt; is undergoing a major refactoring. This post explains the motivation behind this and also what you can expect in the very near future.
The configuration syntax becomes much cleaner and implicit behavior was removed.&lt;/p&gt;
&lt;p&gt;Originally, I needed a &lt;em&gt;docker-maven-plugin&lt;/em&gt; for a very specific use case: To test &lt;a href="http://www.jolokia.org" target="_blank" rel="noreferrer"&gt;Jolokia&lt;/a&gt;, the HTTP-JMX bridge in all the JEE and non-JEE servers out there. This was a very manual process: Fire up the VirtualBox image with all those servers installed, start a server, deploy Jolokia, run integration tests, stop the server, start the next server &amp;hellip;. It takes easily half a day or more to do the tests before each release. That&amp;rsquo;s not the kind of QA you are looking for, really. But with docker there is finally the opportunity to automate all this: Deploy a single application on multiple different servers while controlling the lifecycle of theses servers from within the build.&lt;/p&gt;
&lt;p&gt;Early this year when I searched the Web, I couldn&amp;rsquo;t find a good Docker build integration, so I decided to write my own &lt;a href="http://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;docker-maven-plugin&lt;/a&gt; to back my use case. Today you find nearly a dozen of Maven plugins for your Docker business. However, only four plugins (&lt;a href="https://github.com/alexec/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;alexec&lt;/a&gt;, &lt;a href="https://github.com/wouterd/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;wouterd&lt;/a&gt;, &lt;a href="https://github.com/spotify/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;spotify&lt;/a&gt; and &lt;a href="https://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;rhuss&lt;/a&gt;) are still actively maintained. A later blog post will present a detailed comparison between those four plugins (or come to my &lt;a href="http://jax.de/wjax2014/sessions/docker-fuer-java-entwickler" target="_blank" rel="noreferrer"&gt;W-JAX&lt;/a&gt; session), but this post is about the evolution of the &lt;code&gt;rhuss&lt;/code&gt; plugin.&lt;/p&gt;
&lt;p&gt;It turned out that the plugin works quite well, people liked and starred it on GitHub. It provides also some unique features like creating Docker images from &lt;a href="http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html" target="_blank" rel="noreferrer"&gt;assembly descriptors&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But I was not so happy.&lt;/p&gt;
&lt;p&gt;The reason is, that I started from a very special, probably very uncommon use case: A single application, multiple different servers for multiples tests. A much more common scenario is to have a fixed application server brand for the application, running with multiple linked backend containers like databases. My plugin doesn&amp;rsquo;t work well with running multiple containers at once. Or to state it otherwise: The plugin was not prepared for orchestration of multiple docker containers.&lt;/p&gt;
&lt;p&gt;Also, there was too much happening &lt;em&gt;magically&lt;/em&gt; behind the scenes: When pushing a data image, it was implicitly build. When starting a container for integration test, the data container is also build before.&lt;/p&gt;
&lt;p&gt;Two operational modes were supported: One with images holding the server and data separately in two containers (linked via &lt;code&gt;volumes&lt;/code&gt;) and one so called &lt;em&gt;merged&lt;/em&gt; image, holding both, the application and server together in one image. This is perfect for creating micro services. The mode is determined only by a configuration flag (&lt;code&gt;mergeData&lt;/code&gt;), but it is not really clear how many and what Docker images are created. And it was hard to document which is always a very bad smell.&lt;/p&gt;
&lt;p&gt;So I changed the configuration syntax completely.&lt;/p&gt;
&lt;p&gt;It is now much more explicit and you will know merely by looking at the configuration which and how many containers will be started during integration testing and what the container with the application will look like. I don&amp;rsquo;t want to go into much detail here, the post is already too long. Instead here is an example of the new syntax:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;plugin&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;groupId&amp;gt;org.jolokia&amp;lt;/groupId&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;artifactId&amp;gt;docker-maven-plugin&amp;lt;/artifactId&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;version&amp;gt;0.10.1&amp;lt;/version&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;configuration&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;images&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;image&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;name&amp;gt;consol/tomcat-7.0&amp;lt;/name&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;run&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;volumes&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;from&amp;gt;jolokia/docker-jolokia-demo&amp;lt;/from&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/volumes&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;ports&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;port&amp;gt;jolokia.port:8080&amp;lt;/port&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/ports&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;wait&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;url&amp;gt;http://localhost:${jolokia.port}/jolokia&amp;lt;/url&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;time&amp;gt;10000&amp;lt;/time&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/wait&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/run&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/image&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;image&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;name&amp;gt;jolokia/docker-jolokia-demo&amp;lt;/name&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;build&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;assemblyDescriptor&amp;gt;src/main/assembly.xml&amp;lt;/assemblyDescriptor&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/build&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/image&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/images&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/configuration&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This examples creates and starts &lt;strong&gt;two&lt;/strong&gt; containers during &lt;code&gt;docker:start&lt;/code&gt;, linked together via the &lt;code&gt;volumes&lt;/code&gt; directive. The &lt;strong&gt;&lt;code&gt;&amp;lt;run&amp;gt;&lt;/code&gt;&lt;/strong&gt; configuration section is used to describe the runtime behavior for &lt;code&gt;docker:start&lt;/code&gt; and &lt;code&gt;docker:stop&lt;/code&gt;, and &lt;strong&gt;&lt;code&gt;&amp;lt;build&amp;gt;&lt;/code&gt;&lt;/strong&gt; is for specifying how images are build up during &lt;code&gt;docker:build&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively, a &lt;strong&gt;single&lt;/strong&gt; image could be created:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;plugin&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;groupId&amp;gt;org.jolokia&amp;lt;/groupId&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;artifactId&amp;gt;docker-maven-plugin&amp;lt;/artifactId&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;version&amp;gt;0.10.1&amp;lt;/version&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;configuration&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;images&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;image&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;name&amp;gt;jolokia/docker-jolokia-combined-demo&amp;lt;/name&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;build&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;baseImage&amp;gt;consol/tomcat-7.0&amp;lt;/baseImage&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;assemblyDescriptor&amp;gt;src/main/assembly.xml&amp;lt;/assemblyDescriptor&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/build&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;run&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;ports&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;port&amp;gt;jolokia.port:8080&amp;lt;/port&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/ports&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;wait&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;url&amp;gt;http://localhost:${jolokia.port}/jolokia&amp;lt;/url&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/wait&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/run&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/image&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/images&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;/configuration&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Here &lt;code&gt;consol/tomcat-7.0&lt;/code&gt; is used as base for the image to build and the data referenced in the assembly descriptor is copied into the image. So there is no need to volume-link them together.&lt;/p&gt;
&lt;p&gt;I won&amp;rsquo;t repeat the old, more confusing syntax for this both use cases here, you find it in the current &lt;a href="http://github.com/rhuss/docker-maven-plugin" target="_blank" rel="noreferrer"&gt;online documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Said all that, and since &lt;code&gt;rhuss/docker-maven-plugin&lt;/code&gt; is still pre-1.0, I take the liberty to change it without much thoughts on backwards compatibility (you can easily update old configurations). The new syntax is available since &lt;code&gt;0.10.1&lt;/code&gt;, the old syntax will still be used in the &lt;code&gt;0.9.x&lt;/code&gt; line. Everybody is encouraged to upgrade to &lt;code&gt;0.10.x&lt;/code&gt;, although the documentation still reflects the old syntax (will be fixed soon). Please refer to the &lt;a href="https://github.com/rhuss/docker-maven-plugin/tree/new-config/samples" target="_blank" rel="noreferrer"&gt;examples&lt;/a&gt; on the &lt;code&gt;new-config&lt;/code&gt; branch for more details. An upgrade path will be available soon, too.&lt;/p&gt;
&lt;p&gt;There will be a &lt;code&gt;1.0.0&lt;/code&gt; release before the end of this year.&lt;/p&gt;
&lt;p&gt;Please let me know your feedback on the new syntax and what features you would like to see. Everything is moving before the 1.0.0 freeze. You can open an &lt;a href="http://github.com/rhuss/docker-maven-plugin/issues" target="_blank" rel="noreferrer"&gt;issue&lt;/a&gt; for any suggestion or feature request.&lt;/p&gt;</description></item><item><title>Spicy Docker Java Images with Jolokia</title><link>https://ro14nd.de/jolokia-docker-image/</link><pubDate>Thu, 09 Oct 2014 00:00:00 +0000</pubDate><guid>https://ro14nd.de/jolokia-docker-image/</guid><description>&lt;p&gt;While on the way of transforming the &lt;a href="http://www.jolokia.org" target="_blank" rel="noreferrer"&gt;Jolokia&lt;/a&gt; integration test suite from a tedious, manual, half-a-day procedure to a full automated process I ran into and felt in love with &lt;a href="http://docker.io" target="_blank" rel="noreferrer"&gt;Docker&lt;/a&gt;. As a byproduct a &lt;a href="https://registry.hub.docker.com/u/jolokia/java-jolokia/" target="_blank" rel="noreferrer"&gt;java-jolokia&lt;/a&gt; docker repository emerged, which can be easily used as a Java base image for enabling a Jolokia JVM agent during startup for any Java application.&lt;/p&gt;
&lt;p&gt;These images are variants of the official &lt;a href="https://registry.hub.docker.com/_/java" target="_blank" rel="noreferrer"&gt;java&lt;/a&gt; Java docker image. In order to use the Jolokia agent, a child image should call the script &lt;code&gt;jolokia_opts&lt;/code&gt; (which is in the path). This will echo all relevant startup options that should be included as argument to the Java startup command.&lt;/p&gt;
&lt;p&gt;Here is a simple example for creating a Tomcat 7 images which starts Jolokia along with Tomcat:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FROM jolokia/java-jolokia:7
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ENV TOMCAT_VERSION 7.0.55
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ENV TC apache-tomcat-${TOMCAT_VERSION}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EXPOSE 8080 8778
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RUN wget http://archive.apache.org/dist/tomcat/tomcat-7/v${TOMCAT_VERSION}/bin/${TC}.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RUN tar xzf ${TC}.tar.gz -C /opt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CMD env CATALINA_OPTS=$(jolokia_opts) /opt/${TC}/bin/catalina.sh run&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(&lt;em&gt;Don&amp;rsquo;t forget to use &lt;code&gt;$(jolokia_opts)&lt;/code&gt; or with backticks, but not &lt;code&gt;${jolokia_opts}&lt;/code&gt;&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;The configuration of the Jolokia agent can be influenced with various environments variables which can be given when starting the container:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;JOLOKIA_OFF&lt;/code&gt; : If set disables activation of Jolokia. By default, Jolokia is enabled.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;JOLOKIA_CONFIG&lt;/code&gt; : If set uses this file (including path) as Jolokia JVM agent properties (as described in Jolokia&amp;rsquo;s &lt;a href="http://www.jolokia.org/reference/html/agents.html#agents-jvm" target="_blank" rel="noreferrer"&gt;reference manual&lt;/a&gt;. By default this is &lt;code&gt;/opt/jolokia/jolokia.properties&lt;/code&gt;. If this file exists, it will automatically be taken as configuration&lt;/li&gt;
&lt;li&gt;&lt;code&gt;JOLOKIA_HOST&lt;/code&gt; : Host address to bind to (Default: 0.0.0.0)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;JOLOKIA_PORT&lt;/code&gt; : Port to use (Default: 8778)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;JOLOKIA_USER&lt;/code&gt; : User for authentication. By default authentication is switched off.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;JOLOKIA_PASSWORD&lt;/code&gt; : Password for authentication. By default authentication is switched off.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, if you start your tomcat with &lt;code&gt;docker run -e JOLOKIA_OFF&lt;/code&gt; no agent will be started.&lt;/p&gt;
&lt;p&gt;Currently this image is available from &lt;a href="https://registry.hub.docker.com/u/jolokia/java-jolokia/" target="_blank" rel="noreferrer"&gt;Docker Hub&lt;/a&gt; for the latest versions of Java 6,7 and 8, respectively, as they are provided by the official Docker &lt;a href="https://registry.hub.docker.com/_/java/" target="_blank" rel="noreferrer"&gt;java&lt;/a&gt; image.&lt;/p&gt;
&lt;p&gt;Other base images can be easily added by using the configuration and templates from a super simple node based &lt;a href="https://github.com/rhuss/docker-java-jolokia" target="_blank" rel="noreferrer"&gt;build system&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;All appserver images from &lt;a href="https://github.com/ConSol/docker-appserver" target="_blank" rel="noreferrer"&gt;ConSol/docker-appserver&lt;/a&gt; (&lt;a href="https://registry.hub.docker.com/repos/consol/" target="_blank" rel="noreferrer"&gt;Docker Hub&lt;/a&gt;) are based now on this image, so Jolokia will always be by your side ;-)&lt;/p&gt;</description></item><item><title>Using NSEnter with Boot2Docker</title><link>https://ro14nd.de/nsenter-with-boot2docker/</link><pubDate>Mon, 01 Sep 2014 00:00:00 +0000</pubDate><guid>https://ro14nd.de/nsenter-with-boot2docker/</guid><description>&lt;p&gt;&lt;a href="https://github.com/jpetazzo/nsenter" target="_blank" rel="noreferrer"&gt;NSEnter&lt;/a&gt; is a nice way to connect to a running Docker container. This post presents a script to simplify the usage of &lt;code&gt;nsenter&lt;/code&gt; together with &lt;a href="https://github.com/boot2docker/boot2docker" target="_blank" rel="noreferrer"&gt;Boot2Docker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There is still quite some dust around Docker and after gaining more and more experience, new patterns and anti-patterns are emerging.&lt;/p&gt;
&lt;p&gt;One of those anti-patterns is the usage of an SSH daemon inside an image for debugging, backup and troubleshooting purposes. Jérôme Petazzoni&amp;rsquo;s &lt;a href="https://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/" target="_blank" rel="noreferrer"&gt;Blog Post&lt;/a&gt; explains this nicely. In addition it provides proper solutions for common use cases for which SSH is currently used.&lt;/p&gt;
&lt;p&gt;Nevertheless I still have this irresistible urge to login into a container. And if it is only for looking around and checking out the environment (call me old-fashioned, that&amp;rsquo;s ok ;-)&lt;/p&gt;
&lt;p&gt;Luckily Jérôme provides a perfect solution to satisfy this thirst: &lt;a href="https://github.com/jpetazzo/nsenter" target="_blank" rel="noreferrer"&gt;nsenter&lt;/a&gt;. This allows you to &lt;strong&gt;enter&lt;/strong&gt; into container &lt;strong&gt;n&lt;/strong&gt;ame&lt;strong&gt;s&lt;/strong&gt;paces. On the GitHub page you find the corresponding recipe for installing and using &lt;code&gt;nsenter&lt;/code&gt; on a Linux host.&lt;/p&gt;
&lt;p&gt;If you want to use it from OS X with e.g. &lt;a href="https://github.com/boot2docker/boot2docker" target="_blank" rel="noreferrer"&gt;Boot2Docker&lt;/a&gt; you need to login into the VM hosting the Docker daemon and then connect to a running container.&lt;/p&gt;
&lt;p&gt;As described in the &lt;a href="https://github.com/jpetazzo/nsenter#docker-enter-with-boot2docker" target="_blank" rel="noreferrer"&gt;NSenter README&lt;/a&gt; you can use a simple alias for doing this transparently&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	docker-enter&lt;span style="color:#f92672"&gt;()&lt;/span&gt; &lt;span style="color:#f92672"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	 boot2docker ssh &lt;span style="color:#e6db74"&gt;&amp;#39;[ -f /var/lib/boot2docker/nsenter ] || docker run --rm -v /var/lib/boot2docker/:/target jpetazzo/nsenter&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	 boot2docker ssh -t sudo /var/lib/boot2docker/docker-enter &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$@&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#f92672"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;For a bit more comfort with usage information and error checking you can convert this to a small shell script like &lt;a href="https://gist.github.com/rhuss/a8a40bd143001fd5c83c#file-docker-enter" target="_blank" rel="noreferrer"&gt;docker-enter&lt;/a&gt; which needs to be installed within the path (on OS X). As arguments it expects a container id or name and optionally a command (with args) to execute in the container. This script also will automatically install &lt;code&gt;nsenter&lt;/code&gt; on the boot2docker VM if not already present (like the shell function above does this as well):&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	10:20 &lt;span style="color:#f92672"&gt;[&lt;/span&gt;~&lt;span style="color:#f92672"&gt;]&lt;/span&gt; $ docker ps -q
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	5bf8a161cceb
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	10:20 &lt;span style="color:#f92672"&gt;[&lt;/span&gt;~&lt;span style="color:#f92672"&gt;]&lt;/span&gt; $ docker-enter 5bf8a161cceb bash
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	Unable to find image &lt;span style="color:#e6db74"&gt;&amp;#39;jpetazzo/nsenter&amp;#39;&lt;/span&gt; locally
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	Pulling repository jpetazzo/nsenter
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	Installing nsenter to /target
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	Installing docker-enter to /target
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	root@5bf8a161cceb:/#&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If you want even more comfort with bash completion you can add the small Bash completion script &lt;a href="https://gist.github.com/rhuss/a8a40bd143001fd5c83c#file-docker-enter_commands" target="_blank" rel="noreferrer"&gt;docker-enter_commands&lt;/a&gt; (inspired by and copied from &lt;a href="https://github.com/docker/docker/blob/master/contrib/completion/bash/docker" target="_blank" rel="noreferrer"&gt;Docker&amp;rsquo;s bash completion&lt;/a&gt;) to your &lt;code&gt;~/.bash_completion_scripts/&lt;/code&gt; directory (or wherever your completion scripts are located, e.g. &lt;code&gt;/usr/local/etc/bash_completion.d&lt;/code&gt; if you installed &lt;code&gt;bash-completion&lt;/code&gt; via brew). This setup completes on container names and ids on the arguments for &lt;code&gt;docker-enter&lt;/code&gt;. Alternatively you can put the commands together with the shell function code above directly into your &lt;code&gt;~/.bashrc&lt;/code&gt;, too.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;P.S. After writing this post, I&amp;rsquo;ve found out, that this topic has been already covered in another &lt;a href="http://blog.sequenceiq.com/blog/2014/07/05/docker-debug-with-nsenter-on-boot2docker/" target="_blank" rel="noreferrer"&gt;blog post&lt;/a&gt; previously by Lajos Papp. That&amp;rsquo;s also where the shell function definition in the &lt;code&gt;nsenter&lt;/code&gt; README originates from. Give credit to whom it’s due.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Docker for (Java) Developers</title><link>https://ro14nd.de/docker-for-developers/</link><pubDate>Mon, 25 Aug 2014 00:00:00 +0000</pubDate><guid>https://ro14nd.de/docker-for-developers/</guid><description>&lt;p&gt;Recently I gave a Meetup talk for the &lt;a href="http://www.meetup.com/Docker-Munich/" target="_blank" rel="noreferrer"&gt;Docker Munich&lt;/a&gt; Meetup Group which explained how Docker can help developers to improve integration tests and to ship applications.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://ro14nd.de/meetup-docker-developer-slides" target="_blank" rel="noreferrer"&gt;slides&lt;/a&gt; are online as well as the &lt;a href="https://github.com/rhuss/meetup-docker-demo" target="_blank" rel="noreferrer"&gt;demo project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During the demo I used &lt;a href="https://github.com/paradoxxxzero/butterfly" target="_blank" rel="noreferrer"&gt;Butterfly&lt;/a&gt; for an in-browser shell, which was quite cool, I guess ;-) (This is obviously not enabled in the online slides).&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to continue to celebrate my Docker-♡ with another two talks in autumn:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://onedaytalk.org/index.php/program?id=194" target="_blank" rel="noreferrer"&gt;Boosting your developer toolbox with Docker&lt;/a&gt; at JBoss One Day Talk, September, 29. in Germering (Munich, Germany)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jax.de/wjax2014/sessions/docker-fuer-java-entwickler" target="_blank" rel="noreferrer"&gt;Docker für Java Entwickler&lt;/a&gt; (in german) at W-JAX 14, November, 3. - 7. in Munich&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And there is a slight chance (since the CFP has not yet been declined ;-) to talk at &lt;a href="http://www.devoxx.be/" target="_blank" rel="noreferrer"&gt;Devoxx&lt;/a&gt; about Docker. &lt;a href="http://2014.javazone.no/" target="_blank" rel="noreferrer"&gt;JavaZone&lt;/a&gt; unfortunately declined my CFP, I guess there are already too many riding the docker horse (which is a good thing).&lt;/p&gt;
&lt;p&gt;Nevertheless I will attend both conferences with talks about &lt;a href="http://www.jolokia.org" target="_blank" rel="noreferrer"&gt;Jolokia&lt;/a&gt;, and I&amp;rsquo;m really looking forward to it.&lt;/p&gt;
&lt;p&gt;&amp;lsquo;guess it will become a hot autumn (hotter than this german 2014 summer for sure) &amp;hellip;.&lt;/p&gt;</description></item></channel></rss>