az create container requires credentials for ACR image with anonymous pull access #30518
Labels
Auto-Assign
Auto assign by bot
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Container Instances
az container
Container Registry
az acr
Service Attention
This issue is responsible by Azure service team.
Similar-Issue
Describe the bug
Azure Container Registry (ACR) supports anonymous pull access, but
az create container
always requires credentials whenazurecr.io
is detected in the image URL.This makes it unnecessarily difficult to create a container group using a container image hosted in ACR with anonymous pull access enabled.
Related command
Here's my ACR with anonymous pull access enabled...
... so, no credentials are required to pull an image from it. Look, I can do it from my local machine without logging in...
... so I should be able to create a container group without providing any credentials. But
az container create
detectsazurecr.io
in the image URL (right here) and prompts for registry username and password:Looks like as a workaround, it's possible to just provide random invalid credentials:
Errors
n/a there's no error message, the error is that the command shouldn't prompt for credentials
Issue script & Debug output
n/a
Expected behavior
The error is that
az container create
prompts for credentials in the above scenario when it shouldn't, because the image might be hosted in ACR with anonymous pull access enabled.Environment Summary
Additional context
No response
The text was updated successfully, but these errors were encountered: