I am trying to use the QuestPDF library with docker container.
If i try to send a request via Postman, the following exception was occured:
“The type initializer for ‘SkiaSharp.SKAbstractManagedWStream’ threw an exception.”
This is my current Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal as build WORKDIR /src RUN apt-get update && apt-get install libfontconfig1 -y COPY . . RUN dotnet restore "./DataExportService.csproj" RUN dotnet publish "./DataExportService.csproj" -c Release -o /app --no-restore FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal WORKDIR /app COPY --from=build /app ./ EXPOSE 5000 ENTRYPOINT ["dotnet", "DataExportService.dll"]
Also i tried to add all needed nuget packages.
VS Solution Explorer
Is it possible to suppress this error and make the container work correctly? I have no idea. Thanks.