Difficulty: beginner
Estimated Time: 10-15 minutes

In this scenario, you'll learn how to generate an optimized ASP.NET Core based Docker Container using the multi-stage build process. This allows a single Docker Build to use different base images, allowing the SDK to build the binaries but be removed from the final production-ready Docker Image.



Optimizing ASP.NET Core Docker Container

Step 1 of 5

Step 1 - Example Application

The example application is a ASP.NET Core MVC API. Packages and dependencies are downloaded from NuGet.

The application is configured to listen on port 5000. It has a single endpoint that returns the hostname of the container. You can see the endpoint code in Controllers/IndexController.cs