Can Jprofile connect to JVM running in docker Can Jprofile connect to JVM running in docker docker docker

Can Jprofile connect to JVM running in docker


It is similar as connects JProfiler to a remote JVM, you just need to have the JProfiler agent ready inside your container and expose the port.

This post has a step by step guidehttp://geekspearls.blogspot.com.au/2016/08/configure-jprofiler-92-to-profiling.html


You can use this dockerfile; https://registry.hub.docker.com/u/gingerbeard/java8-jprofiler/dockerfile/

FROM dockerfile/java:oracle-java8MAINTAINER gingerbeard <kulishovt@gmail.com>RUN wget http://download-aws.ej-technologies.com/jprofiler/jprofiler_linux_8_1_2.tar.gz -P /tmp/ &&\ tar -xzf /tmp/jprofiler_linux_8_1_2.tar.gz -C /usr/local &&\ rm /tmp/jprofiler_linux_8_1_2.tar.gzENV JPAGENT_PATH="-agentpath:/usr/local/jprofiler8/bin/linux-x64/libjprofilerti.so=nowait"EXPOSE 8849CMD ["bash"]

make sure to check the ports.


The JProfiler GUI connects to the profiling agent that is loaded in the profiled JVM through a TCP socket.

This is always the case, also if the profiled JVM and the JProfiler GUI are running on the same machine.

Invoking "Session->Integration wizards->New remote integration" will give you the instructions to set this up manually.