public static Aspire.Hosting.IDistributedApplicationBuilder CreateBuilder(Aspire.Hosting.DistributedApplicationOptions options);
static member CreateBuilder : Aspire.Hosting.DistributedApplicationOptions -> Aspire.Hosting.IDistributedApplicationBuilder
Public Shared Function CreateBuilder (options As DistributedApplicationOptions) As IDistributedApplicationBuilder
Parameters Returns
A new instance of the IDistributedApplicationBuilder interface.
ExamplesOverride the container registry used by the distributed application.
var options = new DistributedApplicationOptions
{
Args = args; // Important for deployment tools
ContainerRegistryOverride = "registry.example.com"
};
var builder = DistributedApplication.CreateBuilder(options);
var inventoryDatabase = builder.AddPostgres("mypostgres").AddDatabase("inventory");
builder.AddProject<Projects.InventoryService>()
.WithReference(inventoryDatabase);
builder.Build().Run();
Remarks
The CreateBuilder(DistributedApplicationOptions) method provides greater control over the behavior of the distributed application at runtime. For example providing an options
argument allows developers to force all container images to be loaded from a specified container registry by using the ContainerRegistryOverride property, or disabling the dashboard by using the DisableDashboard property. Refer to the DistributedApplicationOptions class for more details on each option that may be provided.
When supplying a custom DistributedApplicationOptions it is recommended to populate the Args property to ensure that the app host continues to function correctly when used with deployment tools that need to enable publish mode.
Override the container registry used by the distributed application.
var options = new DistributedApplicationOptions
{
Args = args; // Important for deployment tools
ContainerRegistryOverride = "registry.example.com"
};
var builder = DistributedApplication.CreateBuilder(options);
var inventoryDatabase = builder.AddPostgres("mypostgres").AddDatabase("inventory");
builder.AddProject<Projects.InventoryService>()
.WithReference(inventoryDatabase);
builder.Build().Run();
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4