Writing a Dockerfile for NerdDinner

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 ...

Get Docker on Windows - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.