Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithImage

Method
📦 Aspire.Hosting v17.0.0
func (ContainerResource) 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().

Applies to

This method applies to the following types: