I'll follow the multi-stage build approach for NerdDinner, so the Dockerfile for the dockeronwindows/ch-02-nerd-dinner:2e images starts with a builder stage:
# escape=`FROM microsoft/dotnet-framework:4.7.2-sdk-windowsservercore-ltsc2019 AS builderWORKDIR C:\src\NerdDinnerCOPY src\NerdDinner\packages.config .RUN nuget restore packages.config -PackagesDirectory ..\packagesCOPY src C:\srcRUN msbuild NerdDinner.csproj /p:OutputPath=c:\out /p:Configuration=Release
The stage uses microsoft/dotnet-framework as the base image for compiling the application. This is an image which Microsoft maintains on Docker Hub. It's built on top of the Windows Server Core image, and it has everything you need to compile .NET ...