We have a .NET Core 3.1 function running on Linux Azure Function App, but because it uses System.Drawing library it depends on libgdiplus which is not installed in the default docker image, so the function fails.
I read a lot articles suggesting to add the following startup command in the Function App, but it's not working, it's simply not installing the package.
apt-get update && apt-get install -y --allow-unauthenticated apt-utils libc6-dev libgdiplus libx11-dev && rm -rf /var/lib/apt/lists/*
I saw this on the docker logs but still the package is not there.
docker run -d -p 8122:80 --name <image-name> -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=true -e WEBSITE_SITE_NAME=<website-name> -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=<hostname> -e WEBSITE_INSTANCE_ID=<instanceId> -e HTTP_LOGGING_ENABLED=1 mcr.microsoft.com/azure-functions/dotnet:3.0-appservice-stage5 apt-get update && apt-get install -y --allow-unauthenticated apt-utils libc6-dev libgdiplus libx11-dev && rm -rf /var/lib/apt/lists/*
I can install the packages manually by opening a SSH sesion on the Azure Portal and running the command, and run the function succesfully, but obviousy next time it's restarted, the package is gone because the container is restarted as well.
Any other options or any help to troubleshoot this will be highly appreciated.
Thanks!

