分类 "产品规划" 下的文章

构建Docker镜像时安装 libgdiplus

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list
#RUN apt-get update -y && apt-get install -y libgdiplus && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll
RUN apt-get update -y && apt-get install -y libgdiplus locales fontconfig && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll
#添加字体
RUN sed -ie 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/g' /etc/locale.gen && locale-gen && mkdir /usr/share/fonts/truetype/deng/
ADD ./fonts/* /usr/share/fonts/truetype/deng/
RUN fc-cache -vf && fc-list
ENV LANG zh_CN.UTF-8
ENV TZ=Asia/Shanghai
ARG PROJECT
WORKDIR /app
EXPOSE 5050
copy . .


ENTRYPOINT ["dotnet", "xxxx.dll"]

阅读全文