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