Home > Enterprise >  Unable to link Azure Container Registry with Azure Function App
Unable to link Azure Container Registry with Azure Function App

Time:12-13

I have a Resource Group which is having some Azure App Services, Container Registry and a Function App(sharing same plan with App Services). The App Services are deployed with Container Images and are working but while creating a function app, I am not able to get Azure Container Registry option in the dropdown (attached below). Using Azure Portal

I have also tried creating function app with docker image using Terraform but getting Azure Function runtime error.

Using Terraform

While diagnosing from Kudu, I got to know the below issue due to which the Azure Function is throwing runtime error.

Docker_Logs

Can someone help me out with the same?

CodePudding user response:

Unable to link Azure Container Registry with Azure Function App:

Generally, function code can be run in App Service too, and as you mentioned in App Services, there are three types of containers from which to choose. Select Azure container registry detailed by @Abhijit Jana and connect it to the function code.

Alternatively, I tried connecting to my container registry by setting up the functionapp configuration using the Az CLI command and it successfully linked to the function app as follows:

az functionapp config container set --docker-custom-image-name <container registry name> --docker-registry-server-url https://<Registry Name>.azurecr.io  --name <functionApp> --resource-group <resourcegroupName>

enter image description here

Configuration added for docker registry in Azure Portal -> Function App:

enter image description here

You can see all the given details by checking on these settings and change your container registries accordingly if needed:

enter image description here

  • Related