--- title: ".NET APM with Docker (Linux)" slug: "net-core-apm-with-docker-in-linux" description: "Install .NET APM Profiler on Docker/Swarm. Adjust Dockerfile, set env variables, name app in Stackify.json, and verify results in Retrace." updated: 2020-12-21T15:47:04Z published: 2020-12-21T15:47:04Z canonical: "docs.stackify.com/net-core-apm-with-docker-in-linux" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.stackify.com/llms.txt > Use this file to discover all available pages before exploring further. # .NET APM with Docker (Linux) This document details how to install the **.NET APM Profiler** in your **.NET** application running on **Docker** or **Docker Swarm**. ## Prerequisite Follow the [Retrace Docker Install](https://docs.stackify.com/docs/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 && \ chmod +x ./install.sh && \ ./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" ``` #### Name Your Application Create a file named Stackify.json and copy it to your container in the same folder as your application. ``` { "AppName": "MyApp", "Environment": "Production" } ``` ## 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.