ANOTHER ANOTHER TEST ANOTHER TEST This Java application can be used as an example for the WildFly Operator.
The application provides a HTTP endpoint that returns the IP address of its host:
$ curl http://localhost:8080/
{"ip":"172.17.0.3"}
-
Build the Web application
$ mvn clean package
-
Build the Docker image with WildFly S2I for WildFly 17.0
$ s2i build . quay.io/wildfly/wildfly-centos7:17.0 wildfly-operator-quickstart-build
$ docker build --squash -t wildfly-operator-quickstart .
-
Test the Docker image locally
$ docker run -p8080:8080 wildfly-operator-quickstart
...
5:25:18,557 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) started in 8705ms - Started 428 of
616 services (329 services are lazy, passive or on-demand)
$ curl http://localhost:8080/
{"ip":"172.17.0.3"}%
-
Tag and push the image to quay.io/jmesnil/wildfly-operator-quickstart:17.0
$ docker tag wildfly-operator-quickstart quay.io/jmesnil/wildfly-operator-quickstart:17.0
$ docker push quay.io/jmesnil/wildfly-operator-quickstart:17.0