github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/java/Dockerfile (about) 1 FROM openjdk:11.0.11-jdk 2 3 WORKDIR /opt/app 4 RUN git clone https://github.com/pyroscope-io/pyroscope-java.git && \ 5 cd pyroscope-java && \ 6 git checkout v0.6.0 && \ 7 ./gradlew shadowJar && \ 8 cp agent/build/libs/pyroscope.jar /opt/app/pyroscope.jar 9 10 COPY Main.java ./Main.java 11 RUN javac Main.java 12 13 ENV PYROSCOPE_APPLICATION_NAME=simple.java.app 14 ENV PYROSCOPE_PROFILING_INTERVAL=10ms 15 ENV PYROSCOPE_PROFILER_EVENT=cpu 16 ENV PYROSCOPE_UPLOAD_INTERVAL=10s 17 ENV PYROSCOPE_LOG_LEVEL=debug 18 ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040 19 20 CMD ["java", "-XX:-Inline", "-javaagent:pyroscope.jar", "Main"]