Skip to content

inspectit-docker/tomcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tomcat with inspectIT

Tomcat Dockerfile including inspectIT

This docker image is based on the official Tomcat docker image including the inspectIT agent of the open source APM solution www.inspectit.rocks. This image can be used easily as a replacement for the Tomcat image, meaning you only have to change your existing Dockerfile FROM tomcat:latest to FROM inspectit/tomcat:latest.

Quickstart

First you need a running inspectIT CMR. You can use our docker image:

$ docker run -d --name inspectIT-CMR -p 8182:8182 -p 9070:9070 inspectit/cmr

Now you can start a container with the following command:

$ docker run -d --link inspectIT-CMR:cmr -p 8080:8080 inspectit/tomcat

You can now adjust the instrumentation configuration with the inspectIT UI for your needs. Please refer to our documentation or just leave a comment.

Configuration

Agent name

By default, the inspectIT agent uses the hostname (docker-ID) as agent name. You can set a different name setting AGENT_NAME or hostname:

$ docker run -d --link inspectIT-CMR:cmr -e AGENT_NAME=<agent-name> inspectit/tomcat
$ docker run -d --link inspectIT-CMR:cmr -h <agent-name> inspectit/tomcat

Using a custom inspectIT CMR

If you don't want to use the inspectIT CMR docker image or cannot link to it, you can set the IP address and port manually:

$ docker run -d -e INSPECTIT_CMR_ADDR=<cmr-ip-address> -e INSPECTIT_CMR_PORT=<cmr-port> inspectit/tomcat

Specifying the Tomcat version

Currently, this image is based on the latest official Tomcat image. Later, support for different versions is added.

Specifying the inspectIT version

Currently, this image is based on the latest beta inspectIT release. Later, support for other versions is added.

Build the docker image

If you want to build the Tomcat inspectIT image yourself, checkout this repository and run

$ docker build -t inspectit/tomcat .