Azure容器实例-从何处执行"docker登录"在执行"az container create"之前命令 [英] Azure Container Instances - from where to execute "docker login" before we execute "az container create" command

查看:86
本文介绍了Azure容器实例-从何处执行"docker登录"在执行"az container create"之前命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要在专用虚拟网络中部署ACI-Azure容器实例.我们按照示例进行操作,并从此链接准备了YAML文件. https://docs.microsoft.com/zh-我们/azure/container-instances/container-instances-vnet 因此,现在我们需要在该命令之前执行:

we need to deploy ACI - Azure Container Instance in private virtual network. We followed the example and prepared YAML file from this link. https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet So now we need to execute before that our command:

az container create --resource-group myResourceGroup --file vnet-deploy-aci.yaml

在那个Yaml中,我们引用的是图片,类似于上面的示例(只是我们正在使用我们的私有存储库)

in that yaml we are referencing our image, similarly like from the above example (just we are using our private repo )

image: mcr.microsoft.com/azuredocs/aci-helloworld

由于Azure权限,我没有执行此权限的权限,因此我将此yaml文件发送给一位Azure管理员,但他没有使用容器的经验,所以他是,而且我对应该从何处感到困惑在执行 az容器创建之前,触发并执行 docker login repo 命令并输入凭据.

I do not have permission to execute this because of Azure permissions, so I sent this yaml file to one of Azure admins but he does not have experience with containers, so he is , as well as I am confused from where he should trigger and execute docker login repo command and enter credentials, before he execute the az container create.

您能否提供一些指导,因为我也没有在该Azure文档链接上看到该指导,但我想在我们触发"az create"之前,需要使用该命令部署Yaml的命令?

Can you please provide me some guidance since I did not see that on that Azure docs link as well but I suppose that "docker login" command is required before we trigger "az create" command which deploys our yaml?

谢谢!

推荐答案

实际上,当您使用YAML创建ACI时,不需要执行命令 docker login .您只需要使用 imageRegistryCredentials 选项来配置专用注册表的凭据.

Actually, you don't need to execute the command docker login when you use the YAML to create ACI. You just need to use the imageRegistryCredentials option to configure the credential for the private registry.

如果使用图像 mcr.microsoft.com/azuredocs/aci-helloworld ,那么您不需要任何凭据,据我所知,这是一个公共图像.因此,您只需要按照提供的文档中的步骤进行操作即可.

And if you use the image mcr.microsoft.com/azuredocs/aci-helloworld, then you do not need any credential, as I know, it's a public image. So you only need to follow the steps in the doc you provide.

这篇关于Azure容器实例-从何处执行"docker登录"在执行"az container create"之前命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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