Azure Container Instances - from where to execute “docker login” before we execute “az container create” command

一曲冷凌霜 提交于 2021-02-11 12:39:39

问题


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

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

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.

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?

THANK YOU!


回答1:


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.

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.



来源:https://stackoverflow.com/questions/65909620/azure-container-instances-from-where-to-execute-docker-login-before-we-execu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!