.NET Framework is Microsoft's Windows-only application development and runtime framework. Released in 2002 and extended through version 4.8 in 2022, it later evolved into cross-platform .NET. Existing applications can be modernized without rewriting their code by packaging them in Windows containers. section 13.3 section 13.5
A containerized .NET Framework application typically uses:
- A .NET Framework 4.8 SDK image to restore NuGet packages and compile the C# project with MSBuild. section 13.3
- An ASP.NET runtime image containing .NET Framework and IIS to host the compiled output. section 13.3
- Container-specific configuration and startup PowerShell scripts copied separately from the application source configuration. section 13.3
Containerizing Nerd Dinner
A multi-stage Dockerfile builds the unchanged Nerd Dinner application with mcr.microsoft.com/dotnet/framework/sdk:4.8, packages it into an ASP.NET 4.8 image, and serves it through IIS. Build the image with docker build, run it with docker run -d -p 8085:80, and browse to localhost:8085. section 13.3


