且构网

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

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

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

一些调查发现了一种使用Dockerfile向容器添加字体的方法。我们需要在docker文件下面一行:

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 /

下面是更新的Dockerfile:

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