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

     1  FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:6.0
     2  # FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:6.0-alpine
     3  
     4  WORKDIR /dotnet
     5  
     6  RUN wget -qO-  https://github.com/grafana/pyroscope-dotnet/releases/download/v0.8.3-pyroscope/pyroscope.glibc.tar.gz  \
     7        | tar xvz
     8  # RUN wget -qO-  https://github.com/grafana/pyroscope-dotnet/releases/download/v0.8.3-pyroscope/pyroscope.musl.tar.gz  \
     9  #       | tar xvz
    10  
    11  ADD example .
    12  
    13  RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' ')
    14  
    15  ENV CORECLR_ENABLE_PROFILING=1
    16  ENV CORECLR_PROFILER={BD1A650D-AC5D-4896-B64F-D6FA25D6B26A}
    17  ENV CORECLR_PROFILER_PATH=/dotnet/Pyroscope.Profiler.Native.so
    18  ENV LD_PRELOAD=/dotnet/Pyroscope.Linux.ApiWrapper.x64.so
    19  
    20  ENV PYROSCOPE_APPLICATION_NAME=web.dotnet.app
    21  ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040
    22  ENV PYROSCOPE_LOG_LEVEL=debug
    23  ENV PYROSCOPE_PROFILING_ENABLED=1
    24  ENV PYROSCOPE_PROFILING_ALLOCATION_ENABLED=true
    25  ENV PYROSCOPE_PROFILING_CONTENTION_ENABLED=true
    26  ENV PYROSCOPE_PROFILING_EXCEPTION_ENABLED=true
    27  
    28  CMD ["dotnet", "/dotnet/example.dll"]