相当于az acr登录的powershell是什么 [英] what is the powershell equivalent to az acr login

查看:98
本文介绍了相当于az acr登录的powershell是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用powershell如何登录到Azure容器注册表.提供的示例仅适用于Azure CLI

Using powershell how do we login to Azure Container registry. The sample provided is only for is only for Azure CLI

az acr login --name <acrName>

推荐答案

在Azure容器注册表中没有要登录的Powershell,如果要使用Powershell登录,我们应该 docker登录进行登录.

There is no single powershell to login in Azure Container registry, if you want use powershell to login in, we should get the admin credentials for the registry first and run docker login to log in.

您可以参考下面的命令.

You could refer to the command below.

$creds = Get-AzureRmContainerRegistryCredential -Registry $registry
$creds.Password | docker login $registry.LoginServer -u $creds.Username --password-stdin

有关更多详细信息,请参阅此

For more details, refer to this article.

这篇关于相当于az acr登录的powershell是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆