Aspire.Hosting.Azure.ContainerRegistry
13.6.1
Prefix Reserved
dotnet add package Aspire.Hosting.Azure.ContainerRegistry --version 13.6.1
NuGet\Install-Package Aspire.Hosting.Azure.ContainerRegistry -Version 13.6.1
paket add Aspire.Hosting.Azure.ContainerRegistry --version 13.6.1
#r "nuget: Aspire.Hosting.Azure.ContainerRegistry, 13.6.1"
#:package Aspire.Hosting.Azure.ContainerRegistry@13.6.1
#addin nuget:?package=Aspire.Hosting.Azure.ContainerRegistry&version=13.6.1
#tool nuget:?package=Aspire.Hosting.Azure.ContainerRegistry&version=13.6.1
Azure Container Registry hosting integration
Use this integration to model, configure, and orchestrate an Azure Container Registry for container images in an Aspire solution.
Getting started
Prerequisites
- An Aspire AppHost and a running container runtime, such as Docker, for building and pushing container images.
- For deployment, an Azure subscription with permission to create resources and assign roles, and the Azure CLI authenticated with
az login.
Add the integration
From your AppHost directory, add the Aspire.Hosting.Azure.ContainerRegistry integration with the Aspire CLI:
aspire add Aspire.Hosting.Azure.ContainerRegistry
The example also uses the Azure Container Apps deployment target:
aspire add Aspire.Hosting.Azure.AppContainers
Usage example
Then, in the AppHost, add a registry and attach it to an Azure Container Apps environment.
The example uses the core AddDockerfile API and assumes a worker subdirectory of the AppHost directory contains a Dockerfile for a background application.
C#
using Aspire.Hosting;
var builder = DistributedApplication.CreateBuilder(args);
var registry = builder.AddAzureContainerRegistry("registry");
builder.AddAzureContainerAppEnvironment("env")
.WithAzureContainerRegistry(registry);
builder.AddDockerfile("worker", "worker");
builder.Build().Run();
TypeScript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const registry = await builder.addAzureContainerRegistry("registry");
const environment = await builder.addAzureContainerAppEnvironment("env");
await environment.withAzureContainerRegistry(registry);
await builder.addDockerfile("worker", "worker");
await builder.build().run();
WithAzureContainerRegistry selects the registry used by the environment's deployment pipeline and managed-identity image pulls; it is not a runtime connection reference.
Without an explicit registry, the Container Apps environment creates a default registry.
The registry is deployment infrastructure and is not provisioned during local runs. aspire publish generates its Bicep; aspire deploy provisions it and pushes the application's images as part of deployment.
See the Container Apps deployment guide for Azure settings, deployment, and cleanup.
Additional documentation
- https://aspire.dev/integrations/gallery/
- https://aspire.dev/integrations/cloud/azure/azure-container-registry/azure-container-registry-host/
- https://aspire.dev/app-host/container-registry/
- https://learn.microsoft.com/azure/container-registry/
Feedback & contributing
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Aspire.Hosting.Azure (>= 13.6.1)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Azure.Core (>= 1.62.0)
- Azure.Identity (>= 1.21.0)
- Azure.Provisioning (>= 1.6.0)
- Azure.Provisioning.ContainerRegistry (>= 1.1.0)
- Azure.Provisioning.KeyVault (>= 1.1.0)
- Azure.ResourceManager.Authorization (>= 1.1.7)
- Azure.ResourceManager.KeyVault (>= 1.4.0)
- Azure.ResourceManager.Resources.Deployments (>= 1.0.0)
- Azure.Security.KeyVault.Secrets (>= 4.11.1)
- Google.Protobuf (>= 3.36.1)
- Grpc.AspNetCore (>= 2.83.0)
- Grpc.Net.ClientFactory (>= 2.83.0)
- Grpc.Tools (>= 2.83.0)
- Hex1b (>= 0.168.0)
- KubernetesClient (>= 19.0.2)
- MessagePack (>= 2.5.302)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.31)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.12)
- Microsoft.Extensions.Hosting (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Http (>= 10.0.12)
- Microsoft.Extensions.Logging (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- Microsoft.Extensions.Primitives (>= 10.0.12)
- ModelContextProtocol (>= 1.4.1)
- NCrontab.Signed (>= 3.4.0)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.17.0)
- OpenTelemetry.Extensions.Hosting (>= 1.17.0)
- Polly.Core (>= 8.7.0)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.12)
- System.Text.Json (>= 10.0.12)
- YamlDotNet (>= 18.1.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Aspire.Hosting.Azure.ContainerRegistry:
| Package | Downloads |
|---|---|
|
Aspire.Hosting.Azure.AppContainers
Azure container apps resource types for Aspire. |
|
|
Aspire.Hosting.Azure.AppService
Azure app service resource types for Aspire. |
|
|
Aspire.Hosting.Foundry
Microsoft Foundry resource types for Aspire. |
|
|
Aspire.Hosting.Azure.Kubernetes
Azure Kubernetes Service (AKS) resource types for Aspire. |
|
|
Aspire.Hosting.Azure.Provisioning.ContainerRegistry
Opt-in Azure Provisioning Container Registry APIs for polyglot Aspire AppHosts. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 13.6.1 | 0 | 10/7/2026 |
| 13.6.0 | 16,082 | 9/29/2026 |
| 13.5.4 | 38,834 | 9/15/2026 |
| 13.5.3 | 93,771 | 8/25/2026 |
| 13.5.2 | 29,916 | 8/21/2026 |
| 13.5.1 | 4,979 | 8/20/2026 |
| 13.5.0 | 18,844 | 8/18/2026 |
| 13.4.6 | 273,115 | 6/19/2026 |
| 13.4.5 | 18,178 | 6/17/2026 |
| 13.4.4 | 17,641 | 6/15/2026 |
| 13.4.3 | 33,083 | 6/8/2026 |
| 13.4.2 | 27,269 | 6/3/2026 |
| 13.4.1 | 550 | 6/3/2026 |
| 13.4.0 | 8,764 | 6/1/2026 |
| 13.3.5 | 37,951 | 5/21/2026 |
| 13.3.4 | 7,579 | 5/19/2026 |
| 13.3.3 | 13,115 | 5/15/2026 |
| 13.3.2 | 10,063 | 5/14/2026 |
| 13.3.1 | 5,072 | 5/12/2026 |
| 13.3.0 | 34,150 | 5/7/2026 |