Azure App Service 容器映像强制从 Docker Hub 而不是 ACR 中提取

Azure App Service Container Images force pulled from Docker Hub instead of ACR

当使用 Docker Compose Preview.

定义时,Azure 应用服务是否仅支持存储在 Docker 中的图像

我的图像存储在 Azure 容器注册表 (ACR) 中。然而,当我使用 Docker 撰写预览引用存储在 ACR 中的图像时,它会尝试从 Docker Hub 中提取图像,而不是 registry-1.docker.io,它们未存储并失败。

DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://registry-1.docker.io/v2/dev/my_container/manifests/latest: unauthorized: incorrect username or password"}

version: '3.3'
services:
  container_one:
    image: "dev/container_one"
    ports:
      - "80:80"
    restart: always
  container_two:
    image: "dev/container_two"
    ports:
      - "81:81"
    restart: always

我需要将完整的 link 添加到我的 ACR 中。根据 Hong Ooi 的评论。

使用 my.azurecr.io/dev/container_one 解决了我的问题。我的完整配置现在看起来像:

version: '3.3'
services:
  container_one:
    image: "my.azurecr.io/dev/container_one"
    ports:
      - "80:80"
    restart: always
  container_two:
    image: "my.azurecr.io/dev/container_two"
    ports:
      - "81:81"
    restart: always