Friday, February 26, 2016

Docker Image for JBoss EAP

Docker Image for JBoss EAP 

Following post explains how to create Docker Image for JBoss EAP and expose its management and web 8080 port for access from host machine or other applications.

Before proceeding with this article you should have Docker and Docker Machine installed on your machine.

You can also refer to my previous post on how to create simple java post.

Dockerfile

Create a similar Docker file. This file is available at following Github repo - tuhingupta/docker-jboss-eap.


If you look at the dockerfile, you will notice:
at line 1, we start with FROM key word. This tells Docker what image to use as base image.
at line 2, we specify MAINTAINER that tells the name, email of the person maintaining the image
at line 4, WORKDIR specifies the working directory in the image.
at line 5, RUN keyword runs whatever command proceeds it.
at line 6, copy jboss-eap zip file to /usr/software folder in the image
at line 9, unzip jbos-eap zip
at line 15, setup user for jboss admin
at line 18, set JAVA_OPT . We need to bind address and management console address so that EAP will bind on all IP addresses for our container.
at line 21, EXPOSE command is used to expose ports from the container.
at line 26, ENTRYPOINT command tells what command will run when the container starts.

Save this file as Dockerfile in a folder that also contains jboss-eap-6.2.4.zip file.

Building the container 

Now you build the image using the following command:

$ docker build --rm -f Dockerfile -t jboss-eap .

Once the image is built, it is ready to be run.

Run docker image

Run the docker image

$ docker run -it -p 0.0.0.0:9990:9990 -p 0.0.0.0:8080:8080 --name jboss-serv -d jboss-eap

you will notice that we used -p option. 
-p option publishes a container's port(s) to the host.

This option publishes the ip that we bind in line 18 of Dockerfile so that it can be accessed from host by using localhost.

Accessing JBoss URLs

Now you can access JBoss management console using 
http://localhost:9990/management



4 comments:

  1. Maxmunus Providing Free Webinar/Demo on JBoss. JBoss tutorial step to step process will help understanding JBoss tutorial in better way. also JBoss tutorial pdf include each and every detail of JBoss basics for beginners.


    For Registration Contact:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: arun@maxmunus.com
    Contact No: +91- 9738507310,
    Company Website :- http://www.maxmunus.com

    ReplyDelete
  2. I really appreciate the information shared above. It’s of great help. If someone wants to learn Online (Virtual) instructor lead live training in WINDCHILL PLM , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor-led training on WINDCHILL PLM. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ pieces of training in India, USA, UK, Australia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain, and UAE etc.
    Avishek Priyadarshi
    MaxMunus
    E-mail: avishek@maxmunus.com
    Skype id: avishek_2.
    Ph:(0) 8553177744 / 080 - 41103383
    http://www.maxmunus.com/

    ReplyDelete
  3. Great job. Check out this article to learn more about the hybrid app examples.

    ReplyDelete
  4. Every market is different. At https://growth-loops.com/services/international-seo/, we build and implement rock-solid international SEO strategies that work for each target market.

    ReplyDelete