Docker image for Thorntail / wildfly Swarm ?

625 views
Skip to first unread message

cedric

unread,
Jun 29, 2018, 6:34:47 AM6/29/18
to Thorntail
Hi,

I would like to know if there is or will be a docker image for Thorntail / Wildfly-swarm soon ?

Regards,

Ken Finnigan

unread,
Jun 29, 2018, 6:42:08 AM6/29/18
to Thorntail
Cedric,

What would you expect to see in the Docker image given that Thorntail enables a custom packaged application. There isn't something like WildFly that can be part of a Docker layer and you add your application on top.

Ken

Torste Aikio

unread,
Jul 2, 2018, 9:09:55 AM7/2/18
to Thorntail
For reference, in our project, we are using the hollow wf-swarm (haven't updated to thorntail yet) jars to build our own base images. So the base image is just

FROM openjdk:jre-slim

RUN mkdir
/wildfly
WORKDIR
/wildfly
COPY microprofile
-2018.5.0-hollowswarm.jar /wildfly/microprofile.jar

(where microprofile-2018.5.0-hollowswarm.jar is directly downloaded from wf-swarm website)

and then the application Dockerfiles are based on that and run our WARs with the provided hollow JAR

It is not big deal to maintain these by ourselves, but of course it is something that the project could provide.

Personally I believe that hollowjar deployment is preferable model over building fat/uber jars when using Docker, because of  the layering benefits among others.

/Torste Aikio

cedric

unread,
Jul 2, 2018, 10:53:17 AM7/2/18
to Thorntail
Hi

Thanks to you two,

I tried your method but I get this error:

2018-07-02 14:51:41,511 ERROR [org.jboss.msc.service.fail] (MSC service thread 1
-1) MSC000001: Failed to start service org.wildfly.undertow.listener.default: or
g.jboss.msc.service.StartException in service org.wildfly.undertow.listener.defa
ult: WFLYUT0082: Could not start 'default' listener.

Here is the Dockerfile:

FROM openjdk:jre-slim

USER root


RUN mkdir /wildfly

WORKDIR /wildfly

COPY microprofile-2018.5.0-hollowswarm.jar /wildfly/microprofile.jar

ENTRYPOINT ["java", \
"-jar", "/wildfly/microprofile.jar"]

dryseawind

unread,
Jul 2, 2018, 10:58:18 AM7/2/18
to Thorntail
Hi,

use JVM parameter -Djava.net.preferIPv4Stack=true when starting...

cedric

unread,
Jul 3, 2018, 2:56:33 AM7/3/18
to Thorntail
Thanks it works

cedric

unread,
Jul 3, 2018, 3:27:31 AM7/3/18
to Thorntail
Another problem is that I need to modify the module.xml file for my project since i need to add the path com.sun.management

I used to modify it on widlfy but now that I use the hollowswarm.jar I don't find how to do it

any idea ?

Rene B.

unread,
Jul 3, 2018, 3:43:25 AM7/3/18
to Thorntail
Can't you build the hollowjar yourself and copy that into your container? This way you can do anything you want.

cedric

unread,
Jul 3, 2018, 7:45:51 AM7/3/18
to Thorntail
I'm not sure I understand, giving this page http://wildfly-swarm.io/downloads/ the hollowjar belongs to wildfly, I cannot do it myself, can I ?
Sorry I'm not really expert at all of this,

Ladislav Thon

unread,
Jul 3, 2018, 7:49:19 AM7/3/18
to cedric, Thorntail

Exactly like Thorntail produces a couple of hollow JARs, you can build your own. For example, here's how the Microprofile + JPA hollow JAR is built: https://github.com/thorntail/thorntail/blob/master/standalone-servers/microprofile-jpa/pom.xml

LT

--
You received this message because you are subscribed to the Google Groups "Thorntail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+...@googlegroups.com.
To post to this group, send email to thor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/a38c8dad-53b8-4a45-b935-50555374a434%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cedric

unread,
Jul 3, 2018, 8:49:39 AM7/3/18
to Thorntail
Ok I see now thank you for this answer,
But still, once I get the jar, I don't see how I can modify the module.xml file or any other file of thorntail :/
Reply all
Reply to author
Forward
0 new messages