简体   繁体   English

为什么在拉取镜像之前需要登录到 Azure Container Registry,即 az login 不够好?

[英]Why does one need to login into the Azure Container registry before pulling the images from it, i.e. az login is not good enough?

I am already logged in into Azure through az login , however in order to pull images from an ACR I had to also run az acr login - I was not even asked for credentials, because the same account is used.我已经通过az login到 Azure,但是为了从 ACR 中提取图像,我还必须运行az acr login - 我什至没有被要求提供凭据,因为使用了相同的帐户。

I do not understand why is az login not good enough?我不明白为什么az login不够好?

Afaik az acr login actually does perform a docker login with your local docker runtime under the hood.据我所知az acr login实际上没有执行docker login与引擎盖下当地码头工人运行。 As your docker runtime does not know anything about Azure, just az login does not suffice.由于您的 docker 运行时对 Azure 一无所知,因此仅az login是不够的。 You could do the same manually be getting the credentials from your ACR and then run docker login my.azurecr.io --username my --password xxx您可以手动执行相同的操作,从 ACR 获取凭据,然后运行docker login my.azurecr.io --username my --password xxx

az acr login is not required to work with the ACR resource, but only with the registry from a docker perspective, such as pulling or pushing images. az acr login不需要使用 ACR 资源,而只需要从 docker 角度使用注册表,例如拉取或推送图像。

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

相关问题 Azure 容器实例 - 在我们执行“az container create”命令之前从哪里执行“docker login” - Azure Container Instances - from where to execute “docker login” before we execute “az container create” command Azure 容器注册表`docker login` 不起作用 - Azure Container Registry `docker login` does not work 为什么某些 Azure CLI 命令需要 az login - Why does certain Azure CLI commands require az login 登录到 Azure 管道中的 Azure 容器注册表 - Login to Azure Container Registry in Azure Pipeline 使用租户登录 Azure az - Azure az login with tenant WSL-无法登录或从Azure容器注册表中提取图像 - WSL - Can't login or pull image from an azure container registry 从Azure容器注册表中提取图像后,图像将存储在Azure Kubernetes群集中的何处? - Where the images get stored in Azure Kubernetes Cluster after pulling from Azure Container Registry? 为什么使用从点网代码运行的Power Shell命令执行时,z登录命令在Azure上不起作用? - Why az login command does not work on Azure when executed with power shell command that runs from dot net code? Docker 通过服务原理登录到 Azure 容器注册表 - Docker login to Azure Container Registry by Service Principle 无法 docker 登录到 azure 容器注册表 - Unable to docker login into azure container registry
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM