Watch Aspire live streamsDocsTry Aspire

addContainer

Method
📦 Aspire.Hosting v13.6.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addContainer(
name: string,
image: string | AddContainerOptions): ContainerResource;
}

Signature

methodaddContainerbuilder
Adds a container resource to the application.
addContainer(
name: string,
image: string | AddContainerOptions): ContainerResource
namestringThe name of the resource.
imagestring | AddContainerOptionsThe image name or image options for the container.
ContainerResource

Applies to

This method applies to the following types: