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

     1  FROM mcr.microsoft.com/dotnet/sdk:6.0
     2  
     3  WORKDIR /dotnet
     4  
     5  COPY --from=pyroscope/pyroscope-dotnet:0.8.7-glibc /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
     6  COPY --from=pyroscope/pyroscope-dotnet:0.8.7-glibc /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so
     7  
     8  
     9  ADD example .
    10  
    11  RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' ')
    12  
    13  ENV CORECLR_ENABLE_PROFILING=1
    14  ENV CORECLR_PROFILER={BD1A650D-AC5D-4896-B64F-D6FA25D6B26A}
    15  ENV CORECLR_PROFILER_PATH=/dotnet/Pyroscope.Profiler.Native.so
    16  ENV LD_PRELOAD=/dotnet/Pyroscope.Linux.ApiWrapper.x64.so
    17  
    18  ENV PYROSCOPE_APPLICATION_NAME=rideshare.dotnet.app
    19  ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040
    20  ENV PYROSCOPE_LOG_LEVEL=debug
    21  ENV PYROSCOPE_PROFILING_ENABLED=1
    22  ENV PYROSCOPE_PROFILING_ALLOCATION_ENABLED=true
    23  ENV PYROSCOPE_PROFILING_CONTENTION_ENABLED=true
    24  ENV PYROSCOPE_PROFILING_EXCEPTION_ENABLED=true
    25  
    26  
    27  CMD ["dotnet", "/dotnet/example.dll"]