Docker (Linux)
  • Updated on 20 May 2019
  • 1 minute to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Docker (Linux)

  • Print
  • Share
  • Dark
    Light

This document details how to install the .Net Core APM Profiler in your .Net Core application running on Docker or Docker Swarm.

Prerequisite

Follow the Retrace Docker Install Guide.

.Net Core Docker Setup

Dockerfile Configuration

Adjust your Dockerfile to include the .Net Core Profiler:

RUN mkdir -m 0755 -p /stackify-dotnet-apm && \
    cd /stackify-dotnet-apm && \
    wget http://download.stackify.com/stackify-dotnet-apm/stackify-dotnet-apm-install-linux-latest.tar.gz && \
    tar -zxvf stackify-dotnet-apm-install-linux-latest.tar.gz && \
    cd stackify-dotnet-apm-install-linux && \
    ./install.sh --docker && \
    cd .. && \
    rm -rf stackify-dotnet-apm-install-linux && \
    rm stackify-dotnet-apm-install-linux-latest.tar.gz

ENV CORECLR_PROFILER={cf0d821e-299b-5307-a3d8-b283c03916da}
ENV CORECLR_ENABLE_PROFILING=1
ENV CORECLR_PROFILER_PATH="/stackify-dotnet-apm/StackifyProfiler.so"

Running your Application

Start your application with the stackify shared volume.

docker run -v stackify:/usr/local/stackify [your-application-image] 

Verify

Make application requests, you can then verify results in the Retrace dashboard.

Was this article helpful?