From 1b6907c394c0b9fa061d67652e2a279ce4f305fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Fri, 6 Mar 2026 20:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_Event.Web.Entry/Dockerfile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/YD_Event.Web.Entry/Dockerfile b/YD_Event.Web.Entry/Dockerfile index 54f86cc..c3c69b5 100644 --- a/YD_Event.Web.Entry/Dockerfile +++ b/YD_Event.Web.Entry/Dockerfile @@ -6,10 +6,26 @@ FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base #修改apt-get源,加速apt下载 RUN sed -i s@/deb.debian.org/@/mirrors.163.com/@g /etc/apt/sources.list.d/debian.sources #RUN cat /etc/apt/sources.list -#安装fontconfig + +# 第一步:清理并更新apt缓存 RUN apt-get clean -RUN apt-get update -RUN apt-get install -y fontconfig +RUN apt-get update -y + +# 第二步:单独安装fontconfig(字体配置工具) +RUN apt-get install -y --no-install-recommends fontconfig + +# 第三步:单独安装文泉驿微米黑字体 +RUN apt-get install -y --no-install-recommends fonts-wqy-microhei + +# 第四步:单独安装文泉驿正黑字体(备用) +RUN apt-get install -y --no-install-recommends fonts-wqy-zenhei + +# 第五步:刷新字体缓存(关键,确保系统识别新字体) +RUN fc-cache -fv + +# 清理apt缓存,减小镜像体积 +RUN apt-get clean +RUN rm -rf /var/lib/apt/lists/* USER $APP_UID WORKDIR /app