Skip to content
Latchkey

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

Terminal
# 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 true

Common 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

OptionPurpose
--resource-group / -gResource group
--name / -nRegistry name (alphanumeric, globally unique)
--skuBasic, Standard, or Premium
--admin-enabledToggle the admin user (avoid in prod)

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →