Search code examples
docker.net-coreazure-webjobsalpine-linux

How to add a edge/testing package to Alpine Linux?


I have an Azure Linux WebApp using docker-compose to run three containers: Asp.Net Core 3.1 WebApp, Nginx as reverse proxy and an Asp.Net Core WebJob (SKD 3) to gerenate PDF reports. The WebApp is at https://pdf.ricardogaefke.com.

The problem is: the PDF generated has a QrCode with a link to check on it online and I was facing a problem while running the WebJob ("libgdiplus was not found) and I tried to install this libgdiplus package. This problem is related to System.Drawing Namespace.

The problem is that package is in a edge/testing version and it cannot be installed using apk add command. How can I install this package?


Solution

  • It was possible to install the edge/testing package using the repository option, like this:

    RUN apk add libgdiplus --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
    

    Now my WebJob is generating PDF files (the problem was about generating the QrCode as a Bitmap) perfectly. You can check on it at https://pdf.ricardogaefke.com. The Dockerfile with libgdiplus install is here.