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.
Join the DZone community and get the full member experience.Join For Free
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
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
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 .
Published at DZone with permission of Sebastian Laskawiec. See the original article here.
Opinions expressed by DZone contributors are their own.