WildFly 21 S2I images have been released on quay.io

WildFly 21 S2I Docker images

The WildFly S2I (Source-to-Image) builder and runtime Docker images for WildFly 21 have been released on quay.io/wildfly.

For a complete documentation on how to use these images using S2I, OpenShift and Docker, refer to the WildFly S2I README.

Adding the imagestreams and template to OpenShift

At some point the new images will be made available from the OpenShift catalog and image repository. But you can already use these images by adding them yourselves to your OpenShift cluster.

  • WildFly S2I builder image stream:

oc create -n myproject -f https://raw.githubusercontent.com/wildfly/wildfly-s2i/wf-21.0/imagestreams/wildfly-centos7.json
  • WildFly runtime image stream:

oc create -n myproject -f https://raw.githubusercontent.com/wildfly/wildfly-s2i/wf-21.0/imagestreams/wildfly-runtime-centos7.json
  • Chained build template:

oc create -n myproject -f https://raw.githubusercontent.com/wildfly/wildfly-s2i/wf-21.0/templates/wildfly-s2i-chained-build-template.yml

NB: If you import the image streams into your project, be sure to set the ImageStreams Namespace (IMAGE_STREAM_NAMESPACE argument) to your project namespace in the template. openshift being the default namespace.

EJB, JSF new Galleon layers example

WildFly 21 brings a new set of Galleon layers that you can use during s2i build phase. In this example, we are composing a server using these 2 new Galleon layers:

  • ejb-lite: Support for Jakarta Enterprise Beans Lite.

  • jsf: Support for Jakarta Server Faces.

Build and run the application

The example is a CRUD JSF application.

  • Build the application image:

oc new-app wildfly-s2i-chained-build-template -p APPLICATION_NAME=jsf-ejb-jpa \
      -p GIT_REPO=https://github.com/wildfly/wildfly-s2i \
      -p GIT_BRANCH=v21.0 \
      -p GIT_CONTEXT_DIR=examples/jsf-ejb-jpa \
      -p GALLEON_PROVISION_LAYERS=web-server,ejb-lite,jsf,jpa,h2-driver \
      -p IMAGE_STREAM_NAMESPACE=myproject
  • Create an application from the application image:

oc new-app myproject/jsf-ejb-jpa
  • Expose the service:

oc expose svc/jsf-ejb-jpa
  • Access the application route.

You will see pre-populated tasks. You can add, update and delete tasks.