How to add Fonts in azure container?

Abhishek Prajapati 1 Reputation point

I have an application which I have deployed to Azure through docker image. Now I am facing one issue. This application sends an email with RDLC reports. But the reports I am getting in mail have different fonts than the report I am getting previously(without docker). I found that the base docker image I am using does not have fonts loaded with it. I need to install fonts in my docker image/container. How can I do this?

Below is my Dockerfile commands:
COPY . .
ENTRYPOINT BackgroundService.exe

Thanks in advance

Abhishek Prajapati

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,360 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 24,736 Reputation points Microsoft Employee

    Welcome to Microsoft Q&A! Thanks for posting the question.

    • At the end of the Dockerfile, add the following line and save the file.
    • RUN ${source:-obj/Docker/publish/InstallFont.ps1}
      -- InstallFont.ps1 is the file in the CustomFontSample project in the sample highlighted in the document, you may take a similar approach to install the font.

    Additional for a reference, this example Docker File does the following:

    Specifies a Long Term Servicing Channel base Windows Server 2019 Core image, i.e.

    Executes a PowerShell script to download and install the custom font within the container