System.drawing.common the type initializer for 'gdip' threw an exception System.drawing.common the type initializer for 'gdip' threw an exception kubernetes kubernetes

System.drawing.common the type initializer for 'gdip' threw an exception


I have a Dockerfile like this:

FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS baseRUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-devWORKDIR /appEXPOSE 80EXPOSE 443FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS buildWORKDIR /srcCOPY ...

I am running apt-get update and install command on the second line. You may run your command like this. I hope it works for you too.