Public Repository

Last pushed: a year ago
Short Description
JBoss Wildfly 10.1 based on Oracle JDK 1.8.0_111
Full Description

Wildfly 10.1 Docker container

This container contents the JBoss community version of Wildfly 10.1. The Structure of the JBoss installation is

JBOSS_HOME=/opt/jboss
JBOSS_BASE_DIR=${JBOSS_HOME}/standalone
JBOSS_CONFIG_DIR=${JBOSS_BASE_DIR}/configuration

WORKING_DIR=${JBOSS_BASE_DIR}

The JBoss Docker image runs on base on Docker image mkoellges/ubuntu_java8 - means, that the JBoss is running on top of Java 8_111.

In this JBoss instances, the following Database drivers are already installed:

  • Oracle RDBMS
  • Postgres
  • MS SQL Server
  • MySQL

To start the JBoss container you have two different choices.

Standard start

This way starts the container in a method, that all JVM parameters can be passed on command line call for the docker run.

docker run -d \
       --env JVM_PARAM=" -Xms2048m -Xmx2048m" \
       --env CONFIG_TYPE="standalone" \
       --env JBOSS_PWD="change_me_1" \
       --name test-mk-1 \
       -p 9990:9990 \
       -p 8080:8080 \
       mkoellges/wildfly:10.0 \
       start_jboss.sh

The environment parameter can include all JVM parameters and options needed.

The CONFIG_TYPE can be all possible standalone profiles like standalone, standalone-ha, standalone-full and standalone-full-ha.

Centralized configuration and classified start

To simplify the configuration of JBoss instances, you can use the etcd container to store the JBoss configuration and classification.
Here you can use the Docker container for etcd (stored here in our git repository too).

The values needed to configure your JVMs can be stored in the file jboss-config.yml. Read the description of themkoellges/etcd docker container how to load these data.

After the data is loaded and the etcd is running in background, you can simply start your JBoss containers by using a classification.
This is much more simplyfied and more comprehensive rather to configure the JVM Parameters in JVM_PARAM as mentioned above.

Simply start the the ectd docker container (named here etcd-1). Then start the JBoss container and loading the config data from there by

docker run -d \
       --link etcd-1 \
       --env ETCD_NODES=etcd-1:4001  \
       -p 9990:9990 \
       -p 8080:8080 \
       --env CONFIG_TYPE="standalone-ha" \
       --env JBOSS_PWD="change_me_1" \
       --name test-mk-1 \
       mkoellges/wildfly:10.0 \
       start_jboss.sh \
       medium

You can store different values for each JVM Parameter for the classes small, medium and large to decide at containerstart, what kind of stored config yoiu want to use.

Example for a jboss-config.yml config file:

default:
  java_start_parameter:
    JAVA_ARG001: -Djava.net.preferIPv4Stack=true
    JAVA_ARG002: -Djava.awt.headless=true
    JAVA_ARG003: -Xmx512M
    JAVA_ARG004: -Xmx512M
    JAVA_ARG005: -XX:MaxMetaspaceSize=256m
    JAVA_ARG006: -Xss256k
    JAVA_ARG007: -XX:NewSize=330M
    JAVA_ARG010: -XX:+UseParNewGC
    JAVA_ARG011: -XX:+UseConcMarkSweepGC
    JAVA_ARG012: -XX:+CMSClassUnloadingEnabled
    JAVA_ARG013: -XX:+DisableExplicitGC
    JAVA_ARG014: -XX:+PrintGCDetails
    JAVA_ARG015: -XX:+PrintGCDateStamps
    JAVA_ARG016: -Xloggc:/opt/jboss/standalone/log/gc.log
    JAVA_ARG017: -XX:+UseGCLogFileRotation
    JAVA_ARG018: -XX:NumberOfGCLogFiles=10
    JAVA_ARG019: -XX:GCLogFileSize=10M
    JAVA_ARG020: -Duser.timezone=Europe/Berlin
    JAVA_ARG026: -Djava.io.tmpdir=/was/tmp

small:
  java_start_parameter:
    JAVA_ARG003: -Xmx1024m
    JAVA_ARG004: -Xms1024m
    JAVA_ARG005: -XX:MaxMetaspaceSize=256m

medium:
  java_start_parameter:
    JAVA_ARG003: -Xmx2048m
    JAVA_ARG004: -Xms2048m
    JAVA_ARG005: -XX:MaxMetaspaceSize=512m

large:
  java_start_parameter:
    JAVA_ARG003: -Xmx4096m
    JAVA_ARG004: -Xms4096m
    JAVA_ARG005: -XX:MaxMetaspaceSize=1024m

Deployment of an application in a JBoss container

use the sample Dockerfile and create a new application container, where the application will be deployed automatically.
For this, the warfile/earfile must be copied into the ${JBOSS_BASE_DIR}/deployments folder at docker build time.

After starting the JBoss Application container with the knowns Syntaxes, the application will be deployed automatically.

Example Dockerfile:

FROM jboss-eap:6.4.7

COPY sample.war /opt/jboss/standalone/deployments
Docker Pull Command
Owner
mkoellges

Comments (0)