Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Version

Introduction

JBoss Application Server Wildfly running on a stripped Ubuntu (14.04) - bundled as Docker container image.

Thanks to creators of pallet/ubuntu-nodoc and piranha/java8 this project builds on.

Inheritance

ubuntu:14.04 << pallet/ubuntu-nodoc << piranha/java8 << mukarev/docker-wildfly8

Docker

If you're not familiar with Docker please read the guide first.

Setup

Clone or download this repository - also available as automated build.

The './res' directory should contain all necessary resources. If you want to deploy nothing on startup, delete the content of any subfolder.

Copy all apps you want to provide via Wildfly to './res/apps/' before building. They will be wrapped within the container from the Dockerfile build.

If you don't need root welcome content (e.g. running with proxy) at Wildfly base path, leave directory './res/welcome-content' empty. Otherwise place your welcome data in it. It will be included during the docker build.

Wildfly

This image uses latest Wildfly 8.2.0 release and install it similar to jboss/wildfly to the container - but using a Java 8 supporting image parent image.

Wildfly installation directory is available at:

$ /opt/wildfly

Deployment scanner will watch container's directory

$ /opt/wildfly/standalone/deployments

Usage

Run standalone mode

Container runtime defaults to Wildfly standalone mode

$ docker run -it mukarev/docker-wildfly8

or

 `$ docker run -it mukarev/docker-wildfly8 -b 1.2.3.4:80 -bmanagement 1.2.3.4:9090

Run custom mode

To boot in any other mode (e.g. domain mode) call the according script on run:

$ docker run -it mukarev/docker-wildfly8 /opt/wildfly/bin/domain.sh -b 0.0.0.0:8080 -bmanagement 0.0.0.0:9999

Share Configuration

You may want to share configuration files across multiple instances. So persist configuration at host with

$ docker run -d --name wildfly-inst01 -v /host/path/configuration:/opt/wildfly/standalone/configuration mukarev/docker-wildfly8

alternatively you can fork this repo and add

COPY /res/custom/standalone.xml /opt/wildfly/standalone/configuration/standalone.xml

to Dockerfile to ensure configuration at build time.

Deployments

If you plan to use continuous integration, provide a volume accessible by Wildfly and the build-server.

$ docker run -d --name wildfly-inst01 -v /host/share/artifacts:/opt/wildfly/standalone/deployments mukarev/docker-wildfly8

HINT:
For development, integration or testing environments you can run Jenkins CI within Docker as well: JDK 8 supporting Jenkins Docker image

Verify & Test

Access

If there were no errors at start, you can check the welcome content (change Host, DNS or port data according your configuration):

$ curl http://localhost:8080

When running this image you can get infos of the war-file via

$ curl http://localhost:8080/node-info/

You should see something like this:

$ ...
Hostname: f740c76cd66c
Java Runtime: OpenJDK Runtime Environment 1.8.0_26...
OS: Linux amd64 3.15.4-200.fc20.x86_64

##Example log

Executing:

$ docker run -it --name wildfly-inst01

Log output similar to this:

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/wildfly

  JAVA: java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true             -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

09:03:24,625 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
09:03:24,889 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
09:03:24,960 INFO  [org.jboss.as] (MSC service thread 1-8) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
09:03:26,013 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

#...#

09:03:26,938 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "node-info.war" (runtime-name: "node-info.war")
09:03:26,948 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory /opt/wildfly/standalone/deployments
09:03:26,996 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
09:03:27,064 WARN  [org.jboss.metadata.parser.jbossweb.JBossWebMetaDataParser] (MSC service thread 1-4) <replication-mode/> is no longer supported and will be ignored
09:03:27,237 INFO  [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
09:03:27,327 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment node-info.war
09:03:27,375 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.0.Final
09:03:27,485 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: node-info.war
09:03:27,511 INFO  [org.jboss.weld.Version] (MSC service thread 1-2) WELD-000900: 2.1.2 (Final)

#...#

09:03:28,428 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017534: Registered web context: /node-info
09:03:28,481 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "node-info.war" (runtime-name : "node-info.war")
09:03:28,637 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://0.0.0.0:9990/management
09:03:28,638 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990
09:03:28,638 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 4679ms - Started 296 of 341 services (96 services are lazy, passive or on-demand)

Source

The source is available on GitHub.

For out of the box working server we took an easy WAR file from Marek

Issues

Please report any issues on the GitHub issue tracker.

Contribute

Feel free to optimize this image and inform me about your suggestion with Github's create pull request.

License

author m-ko-x.de

Licensed for use with MIT - see './LICENSE' file.

Docker Pull Command
Owner
mukarev
Source Repository

Comments (0)