az acr create: Container Registries & CI Errors
Create an Azure Container Registry to hold your images.
az acr create provisions an Azure Container Registry. The SKU you pick (Basic, Standard, Premium) decides storage, throughput, and which features - like geo-replication and Tasks throughput - are available.
What it does
az acr create --resource-group <rg> --name <name> --sku <sku> creates a registry whose login server is <name>.azurecr.io. Registry names must be globally unique and alphanumeric. The SKU sets capacity and features; Basic is fine for small pipelines, Premium adds geo-replication and private endpoints.
Common usage
# Create a Basic registry
az acr create \
--resource-group my-rg \
--name myregistry \
--sku Basic
# Premium with admin user enabled (avoid admin user in prod)
az acr create -g my-rg -n myregistry --sku Premium --admin-enabled trueCommon error in CI: registry name already taken / invalid name
Creation fails with "The registry name \"myregistry\" is already in use" (names are globally unique across all of Azure) or "Registry name must match ^[a-zA-Z0-9]*$" when it contains hyphens or underscores. Fix: choose a unique, alphanumeric-only name (no hyphens - unlike most Azure resources), and make CI idempotent by checking az acr show -n <name> before creating. Creating a registry needs Contributor on the resource group. Prefer AcrPush/AcrPull RBAC over enabling the admin user.
Key options
| Option | Purpose |
|---|---|
| --resource-group / -g | Resource group |
| --name / -n | Registry name (alphanumeric, globally unique) |
| --sku | Basic, Standard, or Premium |
| --admin-enabled | Toggle the admin user (avoid in prod) |