How to test the portability of docker in fedora with JBoss application?

September 22, 2014 2.8k views

I am a beginner to Docker. I want to test the portability of docker in fedora. I want to create my own image in fedora 19 having Jboss application and try to run this in fedora 20. What I want to do this? Help me with suitable commands.

1 Answer

JBoss provides a set of Docker images that you can use as a base layer for your JBoss application container. They have an overview on their site and you can view their offical images right on Docker Hub. RedHat also has a nice overview.

At its most basic, your Dockerfile might look like:

FROM jboss/wildfly
ADD myapp.war /opt/wildfly/standalone/deployments/

With the war file for your project in the same directory. You could then build it using:

  • docker build -t my-app .

And finally run it with:

  • docker run -it --rm -p 8080:8080 my-app

For information on how to build your own Docker images, check out this tutorial:

by O.S Tezer
In this DigitalOcean article, we will see about automating this process as much as possible, as well as demonstrate the best practices and methods to make most of Docker and containers via *Dockerfiles*: scripts to build containers, step-by-step, layer-by-layer, automatically from a base image.
Have another answer? Share your knowledge.