Azure Functions with Docker Image Error: Azure Functions Runtime is unreachable
Azure Functions with Docker Image Error: Azure Functions Runtime is unreachable
我正在尝试使用 following this doc 的图像部署 Hello World Azure Functions。
唯一的区别是我在该区域使用 WestUS,并将我的图像上传到 Azure 容器注册表:<myname>.azurecr.io/<imagename>
我使用
部署
az functionapp create --name <myppname> --storage-account <mystorageaccount> --resource-group <myresourcegroup> --plan <mypremiumplan> --deployment-container-image-name <myname>.azurecr.io/<imagename>
不过我明白了:
Error:
Azure Functions Runtime is unreachable. Click here for details on storage configuration.
我查看了 troubleshooting docs 和 none 的案例似乎相关。可能是什么问题?
对于你的问题,地区不是问题。可能的原因是自定义镜像没有拉取到你的功能方案,因为你的方案没有拉取权限。
Azure 容器注册表是一个私有注册表。你可以看到这样的 Note:
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
这是原因也是解决办法
另一种解决方案是您可以使用参数
- --docker-registry-server-user
- --docker-registry-server-password
在您的 CLI 命令中为您的 ACR 设置凭据。这是新功能,请参考最新的 CLI 版本。有关详细信息,请参阅 az functionapp create
。
我正在尝试使用 following this doc 的图像部署 Hello World Azure Functions。
唯一的区别是我在该区域使用 WestUS,并将我的图像上传到 Azure 容器注册表:<myname>.azurecr.io/<imagename>
我使用
部署az functionapp create --name <myppname> --storage-account <mystorageaccount> --resource-group <myresourcegroup> --plan <mypremiumplan> --deployment-container-image-name <myname>.azurecr.io/<imagename>
不过我明白了:
Error:
Azure Functions Runtime is unreachable. Click here for details on storage configuration.
我查看了 troubleshooting docs 和 none 的案例似乎相关。可能是什么问题?
对于你的问题,地区不是问题。可能的原因是自定义镜像没有拉取到你的功能方案,因为你的方案没有拉取权限。
Azure 容器注册表是一个私有注册表。你可以看到这样的 Note:
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
这是原因也是解决办法
另一种解决方案是您可以使用参数
- --docker-registry-server-user
- --docker-registry-server-password
在您的 CLI 命令中为您的 ACR 设置凭据。这是新功能,请参考最新的 CLI 版本。有关详细信息,请参阅 az functionapp create
。