ContainerResourceBuilderExtensions.AddContainer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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)
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈