如何使用 'Create container group' 操作将私有 docker 中心映像部署到 Azure 逻辑应用程序

How to deploy a private docker hub image to an Azure Logic App using the 'Create container group' action

第一次在 Docker Hub 上创建映像并尝试将其部署到 Azure。我正在尝试使用 Azure 逻辑应用程序每天将私有 docker 集线器容器安排到 运行,类似于以下内容:https://github.com/Azure-Samples/aci-logicapps-integration

鉴于我正在部署私有映像,我添加了附加参数:imageRegistryCredentials,如下所示:

[
  {
    "password": "<The password for the private registry>",
    "server": "<The Docker image registry server without a protocol such as 'myacr.azurecr.io'>",
    "username": "<The username for the private registry>"
  }
]

我查看了其他多篇关于 docker 注册表网址的帖子,并尝试输入 "server" 凭证的值,例如:

- registry.hub.docker.com/username/repo
- registry.hub.docker.com/username/repo:tag
- index.docker.io/v1/
- docker.io/library/repo:tag

但是他们都抛出以下错误:

{
  "error": {
    "code": "InvalidImageRegistryServer",
    "message": "The server '<server>' in the 'imageRegistryCredentials' of container group '<container group>' is invalid. It should be a valid host name without protocol."
  }
}

为 'server' 凭据提供的正确格式是什么?

imageRegistryCredentials中的服务器应该是index.docker.io,就像你使用ACR时的服务器一样。你也可以看看 the solution in Private docker hub image example.