且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将字体添加到 Windows Docker 容器/图像?

更新时间:2023-12-06 16:10:40

I have done some investigation and found a way to add fonts to the container using Dockerfile. We need to below line docker file:

COPY arial*.ttf c:/windows/fonts/

Below is the updated Dockerfile:

# app image
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019  AS BASE
COPY arial*.ttf c:/windows/fonts/
COPY . .
ENTRYPOINT BackgroundService.exe