How to setup java agents in docker containers so they appear logically in Investigator Tree

Document ID : KB000108567
Last Modified Date : 06/08/2018
Show Technical Document Details
Introduction:

Java Agents are now supported on Docker containers. This is some guidance on how to configure them. 

Question:
How can I  setup Java agents in Docker containers so they appear logically in Investigator Tree?
Since the container doesn't know what host it's actually running on, what is the best practice? 
Environment:
CA APM 10.5
Answer:

"Hostname" is the container ID or the hostname that you configured when starting the container with "docker run -h <hostname>".

You can either change the configuration when building the image (e.g. by changing the init_agent.sh script) or by mounting the configuration into the container.
 
Additional Information: