gertjan
Posts: 1 Joined: Wed Jul 25, 2018 11:42 am
Post
by gertjan » Wed Jul 25, 2018 11:49 am
Hi,
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=0.0.0.0:10001"
EXPOSE 10001
and then publish this base image,
do you allow this, or should we do this every time we build an application image?
Anton Katilin
Posts: 6172 Joined: Wed Aug 11, 2004 8:37 am
Post
by Anton Katilin » Wed Jul 25, 2018 2:35 pm
Hello,
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
https://www.yourkit.com/download/docker/YourKit-JavaProfiler-2018.04-docker.zip
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.