Dockerfile
This commit is contained in:
parent
1b6907c394
commit
4ebaac42f7
@ -7,26 +7,18 @@ FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
|
||||
RUN sed -i s@/deb.debian.org/@/mirrors.163.com/@g /etc/apt/sources.list.d/debian.sources
|
||||
#RUN cat /etc/apt/sources.list
|
||||
|
||||
# 第一步:清理并更新apt缓存
|
||||
RUN apt-get clean
|
||||
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 apt-get update && apt-get install -y \
|
||||
fonts-liberation \
|
||||
fonts-dejavu-core \
|
||||
fonts-wqy-zenhei \
|
||||
fontconfig \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 重建字体缓存
|
||||
RUN fc-cache -fv
|
||||
|
||||
# 清理apt缓存,减小镜像体积
|
||||
RUN apt-get clean
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER $APP_UID
|
||||
WORKDIR /app
|
||||
EXPOSE 8066
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user