Unable to Generate Telerik Type Reports In Docker Container

1 Answer 330 Views
.NET Core General Discussions Report Viewer - HTML5 Upgrade
John Koodarathil
Top achievements
Rank 1
John Koodarathil asked on 03 Apr 2023, 12:01 PM | edited on 03 Apr 2023, 03:12 PM

Hi,

I'm migrating my solution from Dot Net Framework to Dot Net Core 6. On Local Dev Machine which is running on Windows, the reports are getting generated without any issues, but when the same is run in a Docker Container it fails with the following exceptions.

 

 

 

 

I have already tried installing the required libraries which are mentioned in this post but the same persists

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 46555
RUN apt-get update \
    && apt-get install -y --allow-unauthenticated \
        libc6-dev \
        libgdiplus \
        libx11-dev \
    && rm -rf /var/lib/apt/lists/*

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS setup
WORKDIR /src
RUN dotnet restore "SampleProject/SampleReports.csproj"
COPY . .

FROM setup AS build
WORKDIR "/src/"
RUN dotnet build "SampleReports.csproj" -c Release -o /app/build


FROM build AS publish
RUN dotnet publish "SampleReports.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "SampleReports.dll"]

Other information that I would like to add are that my solution uses direct references to Telerik dlls.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 05 Apr 2023, 01:20 PM

Hello John,

The problem is most likely related to a System.Drawing.Common-related change introduced with .NET 6, please see the System.Drawing.Common is not supported on non-Windows platforms starting with .NET 6 - Telerik Reporting KB article for details on what the change is and how to resolve the problem caused by it.

Additionally, I recommend using the Telerik Reporting NuGet packages to ensure that you are using the correct version of the assemblies. Otherwise, make sure that you use the assemblies built for .NET Standard which can be found in the install directory. For example:

C:\Program Files (x86)\Progress\Telerik Reporting <Release>\Bin\netstandard2.0

And for any that are missing there, you may look into the dedicated .NET 6 folder:

C:\Program Files (x86)\Progress\Telerik Reporting <Release>\Bin\net6.0

Please test the suggestions from the KB article and let me know if that helps.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
.NET Core General Discussions Report Viewer - HTML5 Upgrade
Asked by
John Koodarathil
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or