问题
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