Udostępnij za pośrednictwem


ContainerResourceBuilderExtensions.AddContainer Method

Definition

Overloads

AddContainer(IDistributedApplicationBuilder, String, String)

Adds a container resource to the application. Uses the "latest" tag.

AddContainer(IDistributedApplicationBuilder, String, String, String)

Adds a container resource to the application.

AddContainer(IDistributedApplicationBuilder, String, String)

Source:
ContainerResourceBuilderExtensions.cs
Source:
ContainerResourceBuilderExtensions.cs

Adds a container resource to the application. Uses the "latest" tag.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ContainerResource> AddContainer (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string image);
static member AddContainer : Aspire.Hosting.IDistributedApplicationBuilder * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ContainerResource>
<Extension()>
Public Function AddContainer (builder As IDistributedApplicationBuilder, name As String, image As String) As IResourceBuilder(Of ContainerResource)

Parameters

name
String

The name of the resource.

image
String

The container image name. The tag is assumed to be "latest".

Returns

The IResourceBuilder<T> for chaining.

Applies to

AddContainer(IDistributedApplicationBuilder, String, String, String)

Source:
ContainerResourceBuilderExtensions.cs
Source:
ContainerResourceBuilderExtensions.cs

Adds a container resource to the application.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ContainerResource> AddContainer (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string image, string tag);
static member AddContainer : Aspire.Hosting.IDistributedApplicationBuilder * string * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ContainerResource>
<Extension()>
Public Function AddContainer (builder As IDistributedApplicationBuilder, name As String, image As String, tag As String) As IResourceBuilder(Of ContainerResource)

Parameters

name
String

The name of the resource.

image
String

The container image name.

tag
String

The container image tag.

Returns

The IResourceBuilder<T> for chaining.

Applies to