在DockerFile文件中增加一行代码
RUN apt-get update -y && apt-get install -y libgdiplus && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll
例
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 RUN apt-get update -y && apt-get install -y libgdiplus && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll WORKDIR /app COPY . . EXPOSE 80 ENTRYPOINT ["dotnet", "FireManegement.Web.dll"]