Azure Container Registry
Azure Container Registry (ACR) is a managed, private Docker registry service that you use to build, store, and manage container images and related artifacts. As a private Docker registry based on the open-source Docker Registry 2.0, Azure Container Registry offers registry instances deployed as Azure resources, supporting private Docker repository storage and all types of content in Docker, including OCI artifacts.
Tip: Azure Container Registry provides a secure and scalable solution for managing your container images within the Azure ecosystem.
Key Features and Benefits
- Private Registry: Store and manage your container images securely behind Azure's robust security infrastructure.
- Geo-replication: Replicate registries across multiple Azure regions for improved performance and availability for your development teams and applications worldwide.
- Vulnerability Scanning: Integrate with Microsoft Defender for Cloud to scan your container images for vulnerabilities, ensuring the security of your deployments.
- Image Access Policies: Control access to your container images with fine-grained permissions using Azure role-based access control (RBAC).
- ACR Tasks: Automate container image builds and push to your registry with ACR Tasks, enabling CI/CD workflows without needing a full CI/CD system.
- Helm Chart Repository: Store and manage Helm charts for Kubernetes deployments directly within ACR.
Getting Started with Azure Container Registry
1. Create an Azure Container Registry
You can create an ACR instance using the Azure portal, Azure CLI, or Azure PowerShell.
Using Azure CLI
az acr create \
--resource-group myResourceGroup \
--name myRegistry \
--sku Basic \
--location eastus
2. Log in to your Registry
Once created, you can log in to your ACR instance from your local Docker client or from Azure services.
Using Azure CLI
az acr login --name myRegistry
3. Push a Docker Image
Tag your Docker image with your ACR login server name and push it.
Tagging and Pushing
docker tag myimage myRegistry.azurecr.io/myimage:v1
docker push myRegistry.azurecr.io/myimage:v1
4. Pull a Docker Image
Pull the image from your ACR to another machine or service.
Pulling an Image
docker pull myRegistry.azurecr.io/myimage:v1
Common Use Cases
- Storing Docker images for Azure Kubernetes Service (AKS) deployments.
- Distributing application images for Azure App Service or Azure Container Instances.
- Securing proprietary container images within your organization.
- Building and managing CI/CD pipelines for containerized applications.
Important: For production workloads, consider using the Standard or Premium SKU for ACR to benefit from geo-replication, private endpoints, and other advanced features.