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
Describe the bug
First of all the whole documentation in general of
az acris 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 ismyacr, the login server ismyacr-randomsuffix.azurecr.io, why I as a user can log in withaz 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 useaz acr login --name myacr --suffix randomsuffixto succeed. Which is fine for me.However, in
az acr buildthis problem comes again. There, there's even no parameter--suffixand 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 .-- wrongaz acr build -r myacr-randomsuffix -t myimage .-- wrongaz 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
--suffixinaz 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--suffixinaz acr loginand 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