[英]Connecting an Azure Web app (container) to an Azure container registry using the CLI
I'm trying to Connect a Azure Webb app (containers) to an Azure Container Registry Using the Azure CLI.我正在尝试使用 Azure CLI 将 Azure Webb 应用程序(容器)连接到 Azure 容器注册表。 I have an Azure Container Registry located in the same Ressouce Group as the Webb App.我有一个 Azure 容器注册表,位于与 Webb 应用程序相同的资源组中。 My command looks like this: az webapp config container set --name "containerbugdemo" --resource-group "Containerbug" --docker-custom-image-name "application/helloworld:latest" --docker-registry-server-url "https://"$arcName.azurecr.io" --docker-registry-server-password "****" --docker-registry-server-user "***"
After running the command the container settings blade shows the following error:我的命令如下所示: az webapp config container set --name "containerbugdemo" --resource-group "Containerbug" --docker-custom-image-name "application/helloworld:latest" --docker-registry-server-url "https://"$arcName.azurecr.io" --docker-registry-server-password "****" --docker-registry-server-user "***"
运行命令后容器设置刀片显示以下错误:
Failed to get a list of tags.无法获取标签列表。
And the Container fails to get pulled by the WebApp.并且容器无法被 WebApp 拉取。 If I try the same procedure only using the graphical interface through the Azure portal, everything works as expected.如果我通过 Azure 门户仅使用图形界面尝试相同的过程,一切都会按预期工作。
It seems you set the wrong image name.看来您设置了错误的图像名称。 If you use the image in the ACR, you need to set the image name as acrname.azurecr.io/repository:tag
, both when you create the web app and container setting, not just repository:tag
.如果在 ACR 中使用映像,则需要在创建 web 应用程序和容器设置时将映像名称设置为acrname.azurecr.io/repository:tag
,而不仅仅是repository:tag
。 And the server URL is also a mistake that one more double quote in the question.而服务器 URL 也是一个错误,问题中多了一个双引号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.