Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ContainerResource.WithImage

Method
📦 Aspire.Hosting v17.0.0
type ContainerResource interface {
// ... omitted for brevity
WithImage(
image string,
options ...*WithImageOptions,
) ContainerResource
}

Signature

methodWithImagebuilder
Allows overriding the image on a container.
WithImage(
image string,
options ...*WithImageOptions,
) ContainerResource
imagestringImage value.
options...*WithImageOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithImageOptions argument.

Tag*stringTag value.
ContainerResource

The resource builder.

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

Defined on

This method is defined on the following type: