繁体   English   中英

Azure App Service Container Images 强制从 Docker Hub 拉取而不是 ACR

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

当使用Docker 撰写预览定义时,Azure 应用服务是否仅支持存储在 Docker 中的图像。

我的图像存储在 Azure 容器注册表 (ACR) 中。 Yet when I refer to my image stored in ACR using the Docker compose preview, it trys to pull the images from Docker Hub instead, registry-1.docker.io , where they are not stored and fails.

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

在此处输入图像描述

我需要包含指向我的 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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM