telerik reporting .net 5.0 docker support

2 Answers 402 Views
.NET 5 .NET Core Rendering
Top achievements
Rank 1
Robert asked on 07 Jun 2021, 01:49 PM

I upgraded from .net  3.1 to .net 5.0 ..

When i start program locally everything works (rendering etc, i have result and base64 string of pdf)  but inside docker it is not working ..

Do you have any ideas ? I pasted dockerfile

#FROM  AS build
FROM  AS build
ARG APP_ENV=omtest1

#app run environment


COPY test/*.csproj test/
COPY telerik/*.csproj telerik/
#COPY WorkerService3/*.csproj WorkerService3/
RUN dotnet restore  test/test.csproj

# copy and build app and libraries
COPY  test/  test/
COPY  telerik/ telerik/
#COPY  WorkerService3/ WorkerService3/

WORKDIR /src/test
RUN dotnet build -c release

#app ports to be exposed

FROM build AS publish
RUN dotnet publish -r linux-x64 -o /app/publish

# final stage/image
FROM centos:7.5.1804
RUN 		yum install wget -y && \
	yum install -y epel-release && \
	rpm -Uvh && \	
	yum install glibc-devel -y && \
        yum install -y libgdiplus-2.10-10.el7.x86_64 && \
        yum install libX11-devel -y && \
	yum install dotnet-sdk-5.0 -y && \	
        rm -rf /var/cache/yum 
WORKDIR /app/telerik
COPY --from=publish /app/publish .

RUN cd /app/telerik &&  \
    cp te36013t_0.ttf TeleNeo-Regular.otf TeleNeo-Bold.otf TeleGroteskNor_0.ttf te36016t_0.ttf ConnectCode39_0.ttf /usr/share/fonts/
CMD dotnet test.dll --environment development

2 Answers, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 08 Mar 2022, 01:33 PM

Hi Dimitar - yes the problem has been resolved.

The issue ended up being the connection string I was using for development - when testing the example reports that came with the Reporting server within a container, hosted for development in Docker Desktop.   The example connection string name has dots (.) in it which were not being recognized in the docker-componse.override.yml.  I simply replaced the name with all the dots with a string that could easily be using in the docker-compose yaml file.

replaced:   Telerik.Reporting.Examples.CSharp.Properties.Settings.TelerikConnectionString
with:  ReportingExamplesConnectionString

Telerik team
commented on 08 Mar 2022, 03:19 PM

Hi Bob,

Thank you for sharing the solution here!




Plamen Mitrev
Telerik team
answered on 08 Jun 2021, 01:02 PM

Hello Robert,

Thank you for contacting us with this question about Telerik Reporting in a Docker image and I will happily answer it and share more details.

Telerik Reporting can be used in a Docker image, as long as it meets the GDI+ requirements. Please make sure that the libgdiplus library is installed properly, as described in Containerize Telerik Reporting section. That should resolve the issue you encountered.

Test the above suggestions on your end and let me know if you need further assistance, or encounter any troubles.

Plamen Mitrev
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
Top achievements
Rank 1
commented on 08 Jun 2021, 01:12 PM

Hi Plamen !
tnx for you quick answer...

libgdiplus is installed..
when i change sdk from 3.1 --> 5.0 rendering does not working..

please check the dockerfile i attached
Plamen Mitrev
Telerik team
commented on 09 Jun 2021, 01:13 PM

Hi Robert, I see that you have opened a support ticket as well. We discussed it with my colleague and she already replied there. Since this issue will require some additional information and logs, we can continue this discussion in the support ticket. 

Thank you for your cooperation and understanding.

Top achievements
Rank 1
commented on 03 Mar 2022, 09:47 PM | edited

UPDATE:  set my SQL connection strings, restarted the app and it works now.   I'm guessing my container wasn't updated before with the changes I made to my dockerfile... ?

Was this resolved?  Please post here so I can benefit from the resolution.  I'm hosting the report service in a docker container (docker desktop).

Environment:  aspnet core 6.0
Telerik.Reporting.Services.AspNetCore.Trial - version


I've installed required packages:

RUN apt-get update && apt-get install -y libc6-dev libgdiplus libx11-dev && rm -rf /var/lib/apt/lists/*

But, get the following exception when loading one of the sample reports (of course it works fine in windows):


payload - {"report":"Invoice.trdp","parameterValues":{}}

{message: "An error has occurred.",…}  exceptionMessage:
 "Type: Telerik.Reporting.ReportSerialization.Current.ReportSerializable`1[Telerik.Reporting.Report]"

message"An error has occurred."

Telerik team
commented on 08 Mar 2022, 12:04 PM

If I understand correctly, based on the UPDATE statement, the problem has now been resolved for you, is that correct?

If the problem is still present, this issue could be related to the fonts used by the report that you are trying to render in the docker container. I recommend you to go over  The type initializer for 'Telerik.Reporting.Processing.Common.FontContainer' threw an exception KB article and please test the suggested solution.

.NET 5 .NET Core Rendering
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Plamen Mitrev
Telerik team
Share this question