Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[New article]: Document Azure Container Registry hosting integration #3222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
captainsafia opened this issue May 1, 2025 · 1 comment
Open
Assignees
Labels
area-docs doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 ๐Ÿ“Œ seQUESTered Identifies that an issue has been imported into Quest.
Milestone

Comments

@captainsafia
Copy link
Member

captainsafia commented May 1, 2025

Proposed topic or title

Azure Container Registry

Location in table of contents.

/ Integrations / Azure / Container registry

Reason for the article

We're adding a new hosting integration for Azure Container Registry in Aspire that's designed for integration with our compute environments. It allows you to reference existing Azure container registries in your app.

Article abstract

Aspire apps often build and run container images locally but must pull from a secure registry in staging/production.

The new helpers let you:

  • Provision or reference an existing Azure Container Registry.
  • Attach that registry to any compute-environment resource (Container Apps, Docker, Kubernetes, etc.) so the right credentials flow automatically.
  • Grant fine-grained ACR role assignments to other Azure resources.

The feature can be used as follows. In the case below, a new container registry will be provisioned and used as the registry for the default container app environment that is generated.

var builder = DistributedApplication.CreateBuilder(args);

//  Add (or reference) the registry
var acr = builder.AddAzureContainerRegistry("myacr");

//  Wire an environment to that registry
builder.AddAzureContainerAppsEnvironment("env")
       .WithAzureContainerRegistry(acr);

//  (Optional) let a service **push** images
builder.AddProject("api", "../Api/Api.csproj")
       .WithRoleAssignments(acr, ContainerRegistryBuiltInRole.AcrPush);

await builder.Build().RunAsync();

This feature also works in conjunction with the existing resources feature. You can use the following format to reference an existing container registry:

var builder = DistributedApplication.CreateBuilder(args);

var registryName = builder.AddParameterResource("registryName");
var rename = builder.AddParameterResource("rgName");

//  Add (or reference) the registry
var acr = builder.AddAzureContainerRegistry("myacr")
        .PublishAsExisting(registryName, rgName);

//  Wire an environment to that registry
builder.AddAzureContainerAppsEnvironment("env")
       .WithAzureContainerRegistry(acr);

await builder.Build().RunAsync();

Relevant searches

No response


Associated WorkItem - 429903

@captainsafia captainsafia added area-docs doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 labels May 1, 2025
@captainsafia
Copy link
Member Author

@IEvangelist I merged this in just now so it'll land in 9.3.

The package will be marked as preview so the docs should outline this as well.

@IEvangelist IEvangelist added this to the 9.3 milestone May 5, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. label May 5, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. label May 5, 2025
@IEvangelist IEvangelist self-assigned this May 8, 2025
@IEvangelist IEvangelist added the ๐Ÿ—บ๏ธ reQUEST Triggers an issue to be imported into Quest. label May 8, 2025
@dotnetrepoman dotnetrepoman bot added the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. label May 8, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ๐Ÿ—บ๏ธ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. label May 8, 2025
@sequestor sequestor bot added ๐Ÿ“Œ seQUESTered Identifies that an issue has been imported into Quest. and removed ๐Ÿ—บ๏ธ reQUEST Triggers an issue to be imported into Quest. labels May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-docs doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 ๐Ÿ“Œ seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: ๐Ÿ”– Ready
Development

No branches or pull requests

2 participants