Wildfly Swarm - CentOS Docker image
WildFly Swarm versions currently provided are:
- Whatever version your application uses
CentOS versions currently provided are:
To build a WildFly Swarm image from scratch, run:
$ git clone https://github.com/wildfly-swarm/sti-wildflyswarm.git $ cd sti-wildflyswarm $ make build
$ s2i build git://github.com/bparees/openshift-jee-sample openshift/wildflyswarm-10-centos7 wildflyswarmtest $ docker run -p 8080:8080 wildflyswarmtest
Accessing the application:
$ curl 127.0.0.1:8080
OpenShift 3 Usage
First ensure you have a working OpenShift 3
environment with the
oc command in your
$ oc create -f https://raw.githubusercontent.com/wildfly-swarm/sti-wildflyswarm/master/1.0/wildflyswarm-sti-all.json
Wait for that wildflyswarm-10-centos7-build to complete. Monitor it
oc status. After it finishes:
$ oc new-app wildflyswarm-10-centos7~https://github.com/bbrowning/openshift-jee-sample
Wait for the build and deployment to complete and then visit your
app's service host/port (given by
oc status) to see the sample
app. The path
/snoop.jsp will also test a JSP page and output some
This repository also provides a S2I test framework, which launches tests to check functionality of a simple WildFly Swarm application built on top of the wildfly swarm image.
CentOS based image
$ cd sti-wildflyswarm $ make test
CentOS based Dockerfile
This folder contains scripts that are run by S2I:
Is used to restore the build artifacts from the previous built (in case of 'incremental build'), to install the sources into location from where the application will be run and prepare the application for deployment (eg. installing maven dependencies, building java code, etc..).
This script is responsible for running the application built using WildFly Swarm.
In order to do an *incremental build* (iow. re-use the build artifacts from an already built image in a new image), this script is responsible for archiving those. In this image, this script will archive the maven dependencies and previously built java class files.
This folder contains commonly used modules
Contains script used to launch wildfly after performing environment variable substitution into the standalone.xml configuration file.
This folder contains the S2I test framework with a simple JEE application.
Folder containing scripts which are responsible for the build and test actions performed by the
Image name structure
- Platform name (lowercase) - wildflyswarm
- Platform version(without dots) - 10
- Base builder image - centos7
To set environment variables, you can place them as a key value pair into a
file inside your source code repository.
Overrides the default arguments passed to maven durin the build process
This value will be appended to either the default maven arguments, or the value of MAVEN_ARGS if MAVEN_ARGS is set.
If set, WildFly will attempt to define a MySQL datasource based on the assumption you have an OpenShift service named "mysql" defined. It will attempt to reference the following environment variables which are automatically defined if the "mysql" service exists: MYSQL_SERVICE_PORT MYSQL_SERVICE_HOST MYSQL_PASSWORD MYSQL_USER
If set, WildFly will attempt to define a PostgreSQL datasource based on the assumption you have an OpenShift service named "postgresql" defined. It will attempt to reference the following environment variables which are automatically defined if the "postgresql" service exists: POSTGRESQL_SERVICE_PORT POSTGRESQL_SERVICE_HOST POSTGRESQL_PASSWORD POSTGRESQL_USER
Released under the Apache License 2.0. See the LICENSE file.