-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
First of all the whole documentation in general of az acr is not very clear about the new ACRs with a system assigned random suffix in its login server name. For instance, as a user, let's say my ACR name is myacr, the login server is myacr-randomsuffix.azurecr.io, why I as a user can log in with az acr login --name myacr, but a GitHub service principal cannot (it gets "The resource with name 'XXXXX' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription 'XXXXXXX'"), so that it muse use az acr login --name myacr --suffix randomsuffix to succeed. Which is fine for me.
However, in az acr build this problem comes again. There, there's even no parameter --suffix and without which, the command in GitHub workflow will fail (similar error message).
What should we do here?
Related command
az acr build -r myacr -t myimage . -- wrong
az acr build -r myacr-randomsuffix -t myimage . -- wrong
az acr build -r myacr-randomsuffix.azurecr.io -t myimage . -- wrong again.
So where's the equivalent command to az acr login, with --suffix?
Errors
"The resource with name 'myacr' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription 'XXXXXXX'"
Issue script & Debug output
See above
Expected behavior
That whether there's a parameter --suffix in az acr build, or, to make it work by omitting the suffix (I still don't see why there's the difference between a human user (which doesn't need to add --suffix in az acr login and a service principal, which needs it)).
Environment Summary
Not really relevant, it's the GitHub Workflow Ubuntu 22.04 or 24.04.
Additional context
No response