Over a million developers have joined DZone.

Bleeding Edge on Docker

DZone's Guide to

Bleeding Edge on Docker

Infinispan Docker images are usually published with their release, but what do you do if you want to try out some brand new features which have just been merged? Read on to find out how to handle this.

· DevOps Zone ·
Free Resource

Is the concept of adopting a continuous everything model a daunting task for your fast moving business? Read this whitepaper to break down and understand one of the key pillars of this model in Continuous Governance: The Guardrails for Continuous Everything.

As you may have noticed, at Infinispan our Docker images are published together with (or very soon after) releases. But what if you want to try out some brand new features which have just been merged? In that case, you need to build an image by yourself.

Step #1 - Clone JBoss Docker Image Repository

At first, you will need to clone our Infinispan Docker images:

git clone https://github.com/jboss-dockerfiles/infinispan.git
cd infinispan

Step #2 - Build or Download the Latest SNAPSHOT

There are two options here—you can build the distribution yourself or use SNAPSHOTs available on JBoss Nexus repository.

The first option requires checking out the Infinispan source code and performing a Maven build:

git clone https://github.com/infinispan/infinispan.git
cd infinispan
mvn clean install -DskipTests

The second one is much simpler (Infinispan SNAPSHOTs are pushed into the repository after each successful build:

wget -L "https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=snapshots&g=org.infinispan.server&a=infinispan-server-build&v=9.0.0-SNAPSHOT&e=zip"

Step #3 - Building Infinispan Docker Image

One of the steps for building Infinispan Docker image is to download the distribution from the  Infinispan Download page. We need to slightly modify this step and use our manually downloaded packages.

Modify the Dockerfile as shown below:

#Replace this line:
RUN INFINISPAN_SHA=$(curl $DISTRIBUTION_URL.sha1); curl -o /tmp/server.zip $DISTRIBUTION_URL && sha1sum /tmp/server.zip | grep $INFINISPAN_SHA \
  && unzip -q /tmp/server.zip -d $HOME && mv $HOME/infinispan-server-* $HOME/infinispan-server && rm /tmp/server.zip

#With this:
USER root
ADD infinispan-server-9.0.0-SNAPSHOT /opt/jboss/infinispan-server
#Since we are playing with development versions, we don't care about the permissions
RUN  chmod -R 777 /opt/jboss/infinispan-server
RUN  chmod +x /opt/jboss/infinispan-server/bin/*.sh
USER jboss

Now you are ready to invoke the Docker build:

docker build -t infinispan-server .


As you can see building a SNAPSHOT based docker image is very simple. From my own experience I can tell you that pushing it into Docker Hub is the fastest way to start playing with it in any PaaS environment (e.g. Openshift Online)

Happy building!

Are you looking for greater insight into your software development value stream? Check out this whitepaper: DevOps Performance: The Importance of Measuring Throughput and Stability to see how CloudBees DevOptics can give you the visibility to improve your continuous delivery process.

infinispan ,merge ,build ,docker ,image

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}