ManageEngine recognized in the 2023 Gartner® Magic Quadrant™ for Application Performance Monitoring and Observability. Read the report

Install APM Insight Java Agent in Docker

Follow the steps given below to install Java agent in Docker:

  1. Download the latest APM Insight Java agent ( file.
  2. Extract the zip file to a new directory to find agent jar and its configuration files.
  3. Open the apminsight.conf file in any text editor and include/modify the following keys:


    • [LICENSE KEY] - License key obtained from Applications Manager under APM Insight tab.
    • [HOST] - Host at which Applications Manager is running.
    • [PORT] - Port number at which Applications Manager is running.
    • [APPLICATION NAME] - Name of your application.



    To learn more about the configurations, visit our Configuration Guide page.

    Note: Alternatively, the APM Insight application configuration parameters can also be configured as Java System Properties instead of modifying the apminsight.conf file. Learn more

  4. Now create/modify the image file named Dockerfile in the directory location of your choice and include the following commands into the image file:

    #Creating a new directory 'apminsight' under the specified app directory location
    RUN mkdir -p <APP_DIRECTORY_PATH>/apminsight
    #Adding the agent directory files into the specified app directory path under 'apminsight'
    ADD <Agent_directory_path>/ <APP_DIRECTORY_PATH>/apminsight/
    #Configuring Java agent into the application
    ENV JAVA_OPTS="$JAVA_OPTS -javaagent:<APP_DIRECTORY_PATH>/apminsight/apminsight-javaagent.jar"

    • <APP_DIRECTORY_PATH> - Directory where the application is installed.
    • <Agent_directory_path> - Directory where the Java agent is extracted.
  5. Save the file, rebuild the image and start the container.


Following is an example of the commands used for configuring the agent into the image file Dockerfile for Tomcat servers:

FROM tomcat
COPY sample.war /usr/local/tomcat/webapps/
#Add the apminsight and -javaagent parameters
RUN mkdir -p /usr/local/tomcat/apminsight
ADD ./apminsight/ /usr/local/tomcat/apminsight/
ENV JAVA_OPTS="$JAVA_OPTS -javaagent:/usr/local/tomcat/apminsight/apminsight-javaagent.jar"
CMD ["","run"]

Note: To add the agent to server, the -javaagent argument needs to provided. However, this method is a generic solution and may require some modifications depending on your app server/user environment.