vssnapshotdebugger-docker/7.0/jammy/amd64/Dockerfile

38 строки
1.9 KiB
Docker

FROM mcr.microsoft.com/dotnet/aspnet:7.0-jammy-amd64
# Install Visual Studio Snapshot Debugger prerequisites
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
libunwind8 \
libxml2
# Install Visual Studio Snapshot Debugger
ARG VSSNAPSHOTDEBUGGER_VERSION=2.0.31
ARG VSSNAPSHOTDEBUGGER_SHA512=f0b6c57ae9003897961b9651f61792bb54c715475aacc341fdcf5622d46e5a603f4ab5936ed2e0c132d9e1b829a830cccf56f0ae3f52264ae6ecce44822fe608
RUN curl -SL --output vssnapshotdebugger.tar.gz "https://aka.ms/vssnapshotdebugger/release/${VSSNAPSHOTDEBUGGER_VERSION}/vssnapshotdebugger-${VSSNAPSHOTDEBUGGER_VERSION}-linux-x64.tar.gz" \
&& echo "${VSSNAPSHOTDEBUGGER_SHA512} vssnapshotdebugger.tar.gz" | sha512sum -c - \
&& mkdir -p /diag \
&& mkdir -p /tmp/diag \
&& tar -pzxf vssnapshotdebugger.tar.gz -C /diag \
&& rm vssnapshotdebugger.tar.gz
# Set environment variables to load Visual Studio Snapshot Debugger into .NET Core applications
ENV CORECLR_ENABLE_PROFILING=1
ENV CORECLR_PROFILER={324F817A-7420-4E6D-B3C1-143FBED6D855}
ENV CORECLR_PROFILER_PATH_64=/diag/Instrumentation64/libInstrumentationEngine.so
ENV MicrosoftInstrumentationEngine_ConfigPath64_SnapshotDebugger=/diag/Instrumentation64/ProductionBreakpoints_x64.config
ENV MicrosoftInstrumentationEngine_FileLog=Errors
ENV MicrosoftInstrumentationEngine_FileLogPath=/tmp/diag/log.txt
ENV MicrosoftProductionDiagnostics_RuntimeFolder=/diag/Runtime
ENV MicrosoftProductionDiagnostics_UtilsPath=/diag/Utils/ProductionBreakpointsUtils.dll
# Install Visual Studio Debugger
# Check the repo's README for version compatibility with Visual Studio
RUN curl -SL --output getvsdbg.sh "https://aka.ms/getvsdbgsh" \
&& sh ./getvsdbg.sh -v vs2019 -l /diag/vsdbg \
&& rm getvsdbg.sh
# Remove package lists to save space; can be restored with 'apt-get update'
RUN rm -rf /var/lib/apt/lists/*