.Net Core is unexpectedly slow

Issue

An image using .Net Core is unexpectedly slow.

Possible Causes

The official Docker images for .Net Core occasionally have performance issues.

Note : This does not apply to all versions of Dotnet. 3.1 is known to occasionally have this problem.

Solution

  1. Attempt to run the image and tests locally.
    • If the issue persists, continue to step 2.
  2. Create a custom image including only the SDK and any other tools required.

This allows a smaller image and is often known to create better performance.

Create a base image