从Docker Hub而非ACR提取的Azure App Service容器映像强制

问题描述 投票:0回答:1

使用Docker Compose Preview定义时,Azure App Service是否仅支持存储在Docker中的图像。

我的图像存储在Azure容器注册表(ACR)中。但是,当我使用Docker compose预览引用存储在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

enter image description here

azure docker docker-compose yaml docker-image
1个回答
0
投票

我需要包含指向我的ACR的完整链接。根据洪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
© www.soinside.com 2019 - 2024. All rights reserved.