Home

Awesome

REPOSITORY DEPRECATED

The s2i Wildfly image is now maintained here.

The Wildfly v8.1 through v16 images can still be built from this repository, but WF17 onward will come from the new location.

Wildfly - CentOS Docker image

This repository contains the source for building various versions of the WildFly application as a reproducible Docker image using source-to-image. The resulting image can be run using Docker.

Versions

WildFly versions currently provided are:

CentOS versions currently provided are:

Installation

This image is available on DockerHub. To download it, run:

$ docker pull openshift/wildfly-101-centos7

or

$ docker pull openshift/wildfly-100-centos7

To build a WildFly image from scratch, run:

$ git clone https://github.com/openshift-s2i/s2i-wildfly.git
$ cd s2i-wildfly
$ make build VERSION=10.1

** Note: by omitting the VERSION parameter, the build/test action be performed on all provided versions of WildFly.**

Usage

To build a simple jee application using standalone S2I and then run the resulting image with Docker execute:

$ s2i build git://github.com/openshift/openshift-jee-sample openshift/wildfly-101-centos7 wildflytest
$ docker run -p 8080:8080 wildflytest

You can also use this as a S2I Runtime Image, which will produce a final image with source code omitted:

$ s2i build git://github.com/openshift/openshift-jee-sample openshift/wildfly-101-centos7 wildflytest --runtime-image openshift/wildfly-101-centos7
$ docker run -p 8080:8080 wildflytest

Accessing the application:

$ curl 127.0.0.1:8080

Test

This repository also provides a S2I test framework, which launches tests to check functionality of a simple WildFly application built on top of the wildfly image.

Notice: By omitting the VERSION parameter, the build/test action will be performed on all provided versions of WildFly.

Repository organization

Hot Deploy

Hot deploy is enabled by default for all WildFly versions. To deploy a new version of your web application without restarting, you will need to either rsync or scp your war/ear/rar/jar file to the /wildfly/standalone/deployments directory within your pod.

Image name structure

Structure: openshift/1-2-3
  1. Platform name (lowercase) - wildfly
  2. Platform version(without dots) - 101
  3. Base builder image - centos7

Example: openshift/wildfly-101-centos7 Environment variables

To set environment variables, you can place them as a key value pair into a .s2i/environment file inside your source code repository.

Known issues

UTF-8 characters not displayed (or displayed as ?)

This can be solved by providing to the JVM the file encoding. Set variable MAVEN_OPTS=-Dfile.encoding=UTF-8 into the build variables

Copyright

Released under the Apache License 2.0. See the LICENSE file.