Code Monkey home page Code Monkey logo

docker-eap's Introduction

This framework creates a JBoss EAP Docker container.

Preparations

You must have Docker installed and access to Porkchop.

Clean all unused containers and images:

build/bin/docker-rmiu
build/bin/docker-rmc

Building

Prepare JBoss EAP archive:

cd build
./create.sh

Build docker container:

sudo docker build --rm -t porkchop_eap_640 .

Running

Standalone:

sudo docker run -ti --rm --name FOO porkchop_eap_640

-ti - Running interactive with a TTY attached. Could execute as detached processes using -d. This would require a subsequent docker stop command to shutdown a container.

--rm - Deleting the container when it is stopped.

--name FOO - Provides a "known" name in the Dockersphere.

porkchop_eap_640 - Using the porkchop_eap_640:latest image

The container has a default CMD that starts a standalone instance. No further options are required.

Domain:

Automated using Docker Compose

Refer to the compose/eap-domain.yml file and instructions for use.

Manual

The domain controller and hosts can be started so they use mounted directories from the host as key JBoss EAP directories. In this example, the $JBOSS_HOME/domain/configuration directory for each domain instance point to specific directories on the host. The provides one alternative to a flexible configuration.

Run DC:

sudo docker run -ti --rm --name DC -v /docker-eap64/dc/configuration:/opt/jboss-eap/domain/configuration porkchop_eap_640 /eap/bin/launch.sh domain -b 0.0.0.0 -bmanagement 0.0.0.0

-ti - Running interactive with a TTY attached. Could execute as detached processes using -d. This would require a subsequent docker stop command to shutdown a container.

--rm - Deleting the container when it is stopped.

--name DC - Provides a "known" name in the Dockersphere.

-v - Mounts /opt/jboss-eap-6.4/domain/configuration in the container to /docker-eap64/dc/configuration on the host. This mount point is RW for the container. Pay attention, permissions on the host filesystem can cause errors in the container.

porkchop_eap_640 - Using the porkchop_eap_640:latest image

The remainder of the command line is passed to the container to override the Dockerfile's CMD line.

Run HC1:

sudo docker run -ti --rm --name HC1 --link DC:HC1 -v /docker-eap64/hc1/configuration:/opt/jboss-eap/domain/configuration porkchop_eap_640 /eap/bin/launch.sh domain -b 0.0.0.0 -bmanagement 0.0.0.0 -Djboss.domain.master.address=DC

--name HC1 - Give this container a unique name.

--link DC:HC1 - Linking this container to the running DC container for networking visibility.

-Djboss.domain.master.address=DC - Set the domain controller address for this host container. This host container is linked with the DC container and will be able to resolve the IP address of the DC container.

Run HC2:

sudo docker run -ti --rm --name HC2 --link DC:HC2 -v /docker-eap64/hc2/configuration:/opt/jboss-eap/domain/configuration porkchop_eap_640 /eap/bin/launch.sh domain -b 0.0.0.0 -bmanagement 0.0.0.0 -Djboss.domain.master.address=DC

--name HC2 - Give this container a unique name.

--link DC:HC2 - Linking this container to the running DC container for networking visibility.

-Djboss.domain.master.address=DC - Set the domain controller address for this host container. This host container is linked with the DC container and will be able to resolve the IP address of the DC container.

Stopping

Use the docker ps command to list the running containers then use the docker stop <container> command to stop a running container Or use Ctrl-c to end the JBoss EAP process

Useful commands

Get the IP address of a running container:

docker inspect -f '{{ .NetworkSettings.IPAddress }}' <container-name or ID>

Connecting to the domain controller via CLI:

bin/jboss-cli.sh --controller=172.17.0.12:9999 -c

docker-eap's People

Contributors

travisrogers05 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.