NetCore Linux System.Drawing问题

apt-get update  --如果不行则执行 apt-get upgrade
apt-get upgrade  
apt-get install libglib2.0-dev
apt-get install -y libgdiplus

dockerfile增加执行命令:

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80

COPY  bin/Release/netcoreapp3.1 .

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 locales fontconfig && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll


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

你可能感兴趣的:(docker,linux)