github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/dotnet/fast-slow/musl.Dockerfile (about) 1 FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine 2 3 WORKDIR /dotnet 4 5 COPY --from=pyroscope/pyroscope-dotnet:0.8.7-musl /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so 6 COPY --from=pyroscope/pyroscope-dotnet:0.8.7-musl /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so 7 8 ADD example . 9 10 RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' ') 11 12 ENV CORECLR_ENABLE_PROFILING=1 13 ENV CORECLR_PROFILER={BD1A650D-AC5D-4896-B64F-D6FA25D6B26A} 14 ENV CORECLR_PROFILER_PATH=/dotnet/Pyroscope.Profiler.Native.so 15 ENV LD_PRELOAD=/dotnet/Pyroscope.Linux.ApiWrapper.x64.so 16 17 18 ENV PYROSCOPE_APPLICATION_NAME=fast-slow.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/example"]