fabric8/tomcat-9
A simple docker build for installing a vanilla Tomcat 9.0.10 below /opt/tomcat. It comes out of the box and is intended for use for integration testing.
During startup a directory specified by the environment variable DEPLOY_DIR
(/deployments by default) is checked for .war files. If there are any, they are linked into the webapps/ directory for automatic deployment. This plays nicely with the docker-maven-plugin and its 'assembly' mode which can automatically create Docker data container with Maven artifacts exposed from a directory /deployments.
For this image Agent Bond is enabled. Agent Bond exports metrics from Jolokia and jmx_exporter.
The agent is installed as /opt/agent-bond/agent-bond.jar
and enables the following agents by default:
You can influence the behaviour of agent-bond-opts
by setting various environment variables:
Agent bond itself can be influenced with the following environment variables:
jolokia
and jmx_exporter
.
By default both are enabled.Jolokia configuration
/opt/jolokia/jolokia.properties
.0.0.0.0
)8778
)serverCert
configuration is given in AB_JOLOKIA_OPTS
$HOSTNAME
by default, which is the container id)Some options for integration in various environments:
/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
jmx_exporter configuration
jmx_exporter
(in the format <port>:<path to config>
)9779
jmx_exporter
: Default: /opt/agent-bond/jmx_exporter_config.json
Features:
/opt/tomcat/bin/deploy-and-run.sh
which links .war files from /maven to
/opt/tomcat/webapps and then calls undefined run
-Djava.security.egd=file:/dev/./urandom
for faster startup times
(though a bit less secure)You can enable remote debugging by setting JAVA_DEBUG
to any value:
docker pull fabric8/tomcat-9