github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/java-jfr/rideshare/Dockerfile (about)

     1  FROM openjdk:11-slim-bullseye
     2  
     3  WORKDIR /opt/app
     4  
     5  RUN apt-get update && apt-get install ca-certificates -y && update-ca-certificates && apt-get install -y git
     6  
     7  ADD https://github.com/pyroscope-io/pyroscope-java/releases/download/v0.8.0/pyroscope.jar /opt/app/pyroscope.jar
     8  
     9  COPY gradlew .
    10  COPY gradle gradle
    11  RUN ./gradlew
    12  
    13  COPY build.gradle.kts settings.gradle.kts ./
    14  COPY src src
    15  RUN ./gradlew assemble --no-daemon
    16  
    17  ENV PYROSCOPE_APPLICATION_NAME=rideshare.java.push.app
    18  ENV PYROSCOPE_FORMAT=jfr
    19  ENV PYROSCOPE_PROFILING_INTERVAL=10ms
    20  ENV PYROSCOPE_PROFILER_EVENT=itimer
    21  ENV PYROSCOPE_PROFILER_LOCK=1
    22  ENV PYROSCOPE_PROFILER_ALLOC=100k
    23  ENV PYROSCOPE_UPLOAD_INTERVAL=10s
    24  ENV PYROSCOPE_LOG_LEVEL=debug
    25  ENV PYROSCOPE_SERVER_ADDRESS=http://localhost:4040
    26  
    27  CMD ["java", "-javaagent:pyroscope.jar", "-jar", "./build/libs/rideshare-1.0-SNAPSHOT.jar"]