Use a Dockerfile

Note: This scenario applies to containers running in Docker and Kubernetes.

This option uses a Dockerfile to copy the Java Agent to the Docker image at build time. To use the option, create a single image that contains both the application and Java Agent binaries.

To copy the agent into the application image during the Docker image build:

  1. Download and Unzip the Java Agent
  2. Redirect Agent Output to Stdout
  3. Copy the Agent Binaries to the Image
  4. Set the Java Agent Environment Variables
  5. Add the -javaagent Argument to the Startup Command
  6. (OpenShift only) Set the APPDYNAMICS_AGENT_UNIQUE_HOST_ID Environment Variable.
  7. (On-Premises Controller only) Copy the Controller Certs to the Image.