Which exact Jboss product are you aiming for?
What is wrong with the official images?
1- yes, you need to pick a distrubution. Usualy the base images include “just enough OS” and you need to install/confiure every yourself on top of it.
2&3- You could, but usualy you start with an os base image, create a dedicated image with java based on the base image, create a WildFly image based on your java image… and so on. At a later point in time, you could create a Tomcat image using your java image as the base…
4- The containerization overhead is marely noticable
5- Instead of terminal interaction, you usualy define environment variables when creating the container, which usualy are processed by entrypoint scripts that do the magic: setup datasources, modify parts of the configuration, whatever you can dream of. Though, It is up to you how you design and implement the entrypoint scripts…
In our project we use wildfly as well:
- Base image
– Java image, based on base image (install java)
– Wildfly image, based on Java image (install and configure Wildfly, add entrypoint script to configure and start wildfly)c
— Flyway image, based on Wilfly image (install flyway, add entrypoint script to run flyway, then delegate to wildfily entrypoint scripts)
----- Application Image, based on Flyway (add war-files, extract Flyway-migration scripts, delegate to Flyway enrypoint scripts)
At the end we have an entrypoint script that calls other entrypoint scripts to configures and executes database migrations, modifes the datasource(s) and configures other parts of the config and starts wildfly.
– do not bother to dynamicly add datasources with the jboss console
– you might want to create a template for your configuration files and render the target config file using the environment variables (don’t forge default values). If you need dynamic rendering (to support 1 to n datasource for instance), take a look at Dockerize.