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.
The environment is connected to a sandboxed Docker instance, and the code for a default ASP.NET Core application is in the working directory. To view the code use ls
and cat <filename>
The machine name Docker is running on is called docker. If you want to access any of the services then use docker instead of localhost or 0.0.0.0.

Steps
Optimizing ASP.NET Core Docker Container
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
You’ll love Katacoda

Guided Path
Knowing what you need to know is the hardest part. Our guided pathways help build your knowledge around real-world scenarios.

Learn By Doing
The best way to learn is by doing. All our tutorials are interactive with pre-configured live environments ready for you to use.

Stay up-to-date
It's a competitive industry. Your skills need to keep up with the latest approaches. Katacoda keeps your skills up-to-date.
You’ll love Katacoda

Guided Path
Knowing what you need to know is the hardest part. Our guided pathways help build your knowledge around real-world scenarios.

Learn By Doing
The best way to learn is by doing. All our tutorials are interactive with pre-configured live environments ready for you to use.

Stay up-to-date
It's a competitive industry. Your skills need to keep up with the latest approaches. Katacoda keeps your skills up-to-date.