如何从逻辑应用程序在 Azure 容器注册表中进行身份验证

How can I authenticate at Azure Container registry from an Logic App

我正在开发一个应用程序,它需要在消息队列中收到消息时启动容器。为此,我决定使用 Azure 逻辑应用程序来监视队列和 Azure 容器实例以 运行 连接容器。

逻辑应用程序非常简单,它由以下步骤组成:

  1. 监控队列
  2. 通过 "Create Container Group"-连接器启动容器。

这对 public 容器非常有效。但是,现在我想切换到我的私有 Container Registry 中的容器,我 运行 遇到 Container Registry 的身份验证问题:

"The image 'something/somethingstub:latest' in container group '' is not accessible. Please check the image and registry credential.""

我已尝试按照 here 所述配置 "imageRegistryCredentials" 选项来使用注册表进行身份验证。但这并没有帮助。

有人对如何进行有任何指示吗?

你能查一下图片名称吗?对于私有注册表,映像名称以服务器主机名开头,例如如果它是 azure registry,图像名称应该类似于 myregistry.azurecr.io/myimage:latest

在逻辑应用中配置注册表凭据时,"imageRegistryServer" 应与映像名称中的服务器匹配。

您可以在此处找到其中一个示例:https://lnx.azurewebsites.net/serverless-2-azure-logic-apps-and-azure-container-instances/