Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

DistributedApplicationBuilder.AddContainer

Method
📦 Aspire.Hosting v17.0.0
type DistributedApplicationBuilder interface {
// ... omitted for brevity
AddContainer(
name string,
image any,
) ContainerResource
}

Signature

methodAddContainerbuilder
Adds a container resource to the application.
AddContainer(
name string,
image any,
) ContainerResource
namestringThe name of the resource.
imageanyThe image name or image options for the container.
ContainerResource

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: