Download the agent, see our doc
The startup parameters of the Java application server must include the built-in argument -javaagent.
It is recommended that you set this argument with the JAVA_OPTS environment variable.
The value of that argument must contain the location where you ADD the easeagent.jar file to the image.
For example, with Tomcat, use commands like these in the Dockerfile:
RUN mkdir -p /usr/local/tomcat/easeagent
ADD ./easeagent/easeagent.jar /usr/local/tomcat/easeagent/easeagent.jar
ENV JAVA_OPTS="$JAVA_OPTS -javaagent:/usr/local/tomcat/easeagent/easeagent.jar"
Deploy your application to start using the EaseAgent to send data to MegaCloud.