Welcome to Microsoft Q&A! Thanks for posting the question.
- At the end of the Dockerfile, add the following line and save the file.
- RUN ${source:-obj/Docker/publish/InstallFont.ps1}
-- InstallFont.ps1 is the file in the CustomFontSample project in the sample highlighted in the document, you may take a similar approach to install the font.
Additional for a reference, this example Docker File does the following:
Specifies a Long Term Servicing Channel base Windows Server 2019 Core image, i.e. mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
Executes a PowerShell script to download and install the custom font within the container