.net 6 项目部署在docker容器中添加 libgdiplus 依赖库的安装

如果项目中有涉及到gdi+ 相关的操作引用就需要安装依赖库 libgdiplus(linux下)

在 dockerfile 加入如下代码

1.配置依赖库镜像地址

RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ sid main contrib non-free" > /etc/apt/sources.list

 2.安装依赖包

RUN apt-get update && apt-get install -y apt-transport-https ca-certificates apt-utils libgdiplus libc6-dev && apt-get install -y libfreetype6 && apt-get install -y libfontconfig1 && apt-get install -y fontconfig

 

如下图:

 

posted @ 2022-06-10 10:47  喻平勇  阅读(1942)  评论(2编辑  收藏  举报