0

I'm trying to deploy the Hello World Azure Function using a Docker image by following this doc to the letter. The only difference is I'm using WestUS for the region, and uploaded my image to Azure Container Registry: <myname>.azurecr.io/<imagename>

I deploy using

az functionapp create --name <myppname> --storage-account <mystorageaccount> --resource-group <myresourcegroup> --plan <mypremiumplan> --deployment-container-image-name <myname>.azurecr.io/<imagename>

However I get this:

Error:

Azure Functions Runtime is unreachable. Click here for details on storage configuration.

I looked through the troubleshooting docs and none of the cases seem relevant. What could be the issue?

1
  • It seems the region you want to deploy your function is different from the region of the storage. Commented Nov 20, 2019 at 2:03

1 Answer 1

2

For your issue, the region is not the problem. The possible reason is that the custom image does not pull down to your function plan, because your plan does not have the permission to pull it.

The Azure Container Registry is a private registry. You can see the Note like this:

If your container is private, you would have to set the following application settings as well

  • DOCKER_REGISTRY_SERVER_USERNAME
  • DOCKER_REGISTRY_SERVER_PASSWORD

You will have to stop and then start your function app for these values to be picked up

It's the reason and also the solution.

And another solution is that you can use the parameters

  • --docker-registry-server-user
  • --docker-registry-server-password

in your CLI command to set a credential for your ACR. It's the new feature refer to the latest CLI version. For more details, see az functionapp create.

Sign up to request clarification or add additional context in comments.

1 Comment

Under Function app settings -> Container settings -> Image source There are 3 options: Azure Container Registry, Docker Hub, and Private Registry. What do these setting do and why does it not work to configure my ACR from here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.