Install for Linux Docker containers

The .NET Core agent supports running within a Linux Docker container, including the Linux Docker images pre-installed by Microsoft with .NET Core.

1. Prepare your application directory

Install Docker.

Create your web application and publish it locally, making sure to publish using the appropriate Linux runtime identifier (RID) for the Linux version you plan to use in your container. For more information, see Microsoft's dotnet-publish documentation.

Download the appropriate New Relic .Net Core agent package from New Relic's download site into a newrelic folder in the application root.

2. Create a Dockerfile

Instructions for writing a Dockerfile or docker-compose.yml file that creates a working container vary depending on your Linux version. The following example uses the Microsoft-published Docker image that contains the .NET Core SDK on Debian 9.