az acr 使用基本映像为私有 docker 注册表构建身份验证

时间:2021-06-24 09:00:32

标签: build docker-registry azure-cli azure-acr

我们在私有 ACR 中有一些基础镜像,我们希望使用来自第一个注册中心的基础镜像在其他 ACR 中构建镜像。构建失败并显示身份验证错误。

有没有办法授权 az acr 构建代理到远程 docker 注册表或不同的 ACR?

1 个答案:

答案 0 :(得分:0)

您不能直接使用 build 命令从基础注册表中的基础映像构建目标注册表中的映像。因为 az acr build 仅支持这些源位置:本地源代码目录路径(例如“./src”),或 git 存储库的 URL(例如 https://github.com/Azure-Samples/acr-build-helloworld-node.git

你可以Import container images to a container registry

az acr import \
  --name myregistry \
  --source docker.io/library/hello-world:latest \
  --image hello-world:latest