Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithBuildArg

Method
📦 Aspire.Hosting v17.0.0
func (ContainerResource) WithBuildArg(
name string,
value any,
) ContainerResource

Signature

methodWithBuildArgbuilder
Adds a build argument when the container is built from a Dockerfile.
WithBuildArg(
name string,
value any,
) ContainerResource
namestringThe name of the build argument.
valueanyThe build argument value, either a string or a parameter resource.
ContainerResource

The resource builder.

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

Applies to

This method applies to the following types: