Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Docker base image with Profiler

Moderators: Vladimir Kondratyev, Anton Katilin

Docker base image with Profiler

Postby gertjan » Wed Jul 25, 2018 11:49 am


To make it easier for out dev's to use this, I want to create a base image that does

Code: Select all
RUN apt-get update && \
    apt-get -y install curl unzip && \
    curl -fsSL https://www.yourkit.com/download/YourKit-JavaProfiler-2018.04.zip > /tmp/yjp.zip && \
    unzip -o -d /usr/local /tmp/yjp.zip  && \
    apt-get -y remove curl unzip && \
    apt-get autoclean && \
    rm /tmp/yjp.zip && \
    rm -rf /var/lib/{apt,dpkg,cache,log}/
ENV JVM_OPTS="-agentpath:/usr/local/YourKit-JavaProfiler-2017.02/bin/linux-x86-64/libyjpagent.so=listen="
EXPOSE 10001

and then publish this base image,
do you allow this, or should we do this every time we build an application image?
Posts: 1
Joined: Wed Jul 25, 2018 11:42 am

Re: Docker base image with Profiler

Postby Anton Katilin » Wed Jul 25, 2018 2:35 pm


I wouldn't recommend caching it because if a newer build with bug fixes and improvements is available it won't be applied. The docker zip (see below) is only 4.5 MB, it shouldn't take long to download it.

Other notes:

1. The URL you specified is incorrect. It should instead be:
Code: Select all

Please see the docs: https://www.yourkit.com/docs/java/help/docker.jsp

2. In the line "ENV JVM_OPTS=..." there is a version mismatch: you download the latest version 2018.04, but refer to the agent from 2017.02.
Anton Katilin
Posts: 5719
Joined: Wed Aug 11, 2004 8:37 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 16 guests