FROM jboss/wildfly:19.1.0.Final ENV JBOSS_HOME /opt/jboss/wildfly # Set the TEIID_VERSION env variable ENV TEIID_VERSION 16.0.0 # Download and unzip Teiid server RUN cd $JBOSS_HOME \ && curl -O https://oss.sonatype.org/service/local/repositories/releases/content/org/teiid/teiid/$TEIID_VERSION/teiid-wildfly-$TEIID_VERSION-dist.zip \ && bsdtar -xf teiid-wildfly-$TEIID_VERSION-dist.zip \ && chmod +x $JBOSS_HOME/bin/*.sh \ && rm teiid-wildfly-$TEIID_VERSION-dist.zip VOLUME ["$JBOSS_HOME/standalone", "$JBOSS_HOME/domain"] USER jboss ENV LAUNCH_JBOSS_IN_BACKGROUND true # Expose Teiid server ports EXPOSE 8080 9990 31000 35432 # Run Teiid server and bind to all interface CMD ["/bin/sh", "-c", "$JBOSS_HOME/bin/standalone.sh -c standalone-teiid.xml -b 0.0.0.0 -bmanagement 0.0.0.0"]
Running Teiid as a Docker container is straight-forward, but since the runtime by itself is not a turn-key environment you must consider how you will configure/use the server from there.
The following is a basic Dockerfile that can be used to create a base image. Just create a Dockerfile with these contents and run "docker build ." from that directory.
Pre-built images can be found at Docker Hub.
If you are just using the Teiid Docker environment for more than just testing you will likely want to extend the base image or base Dockerfile to overlay the necessary modules, vdbs, and other artifacts as well as run any necessary cli to create your data sources.
See the Teiid Docker Quickstart that shows starting the Teiid container and performing mutative operations after it is started.
See the WildFly with MySQL example that shows extending the WildFly image to include a MySQL source. Note that this is based upon also having the database containerized and thus exposing the container linking variables. If that is not the case for your environment, you will have to provide the host/port information in a different way.
OpenShift is the Red Hat enterprise offering of Kubernetes which also utilizes Docker. While you may usually be able to use your existing Docker containers on OpenShift, there are additional considerations and features.
See JDV on OpenShift for an overview of how the productized version of Teiid can be run on OpenShift.
A simplified form of immutable containers, but with additional OpenShift features such as health checks and better JVM constraints, can be seen at OpenShift Teiid Server Docker. Note however that many of the resource concerns have been addressed by later java versions which automatically detect memory constraints in vm sizing and report an appropriate number of available processors.
See link:http://teiid.io/tools/beetle_studio/ for tooling that provides a turn-key experience for creating containerized virtualizations. Under the covers it uses fabric8 and Thorntail to create images. See Teiid Thorntail Examples for direct usage of the build logic.