Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ContainerResource.WithContainerFiles

Method
📦 Aspire.Hosting v17.0.0
type ContainerResource interface {
// ... omitted for brevity
WithContainerFiles(
destinationPath string,
sourcePath string,
options ...*ContainerFilesOptions,
) ContainerResource
}

Signature

methodWithContainerFilesbuilder
Creates or updates files and folders in a container by copying them from a source path on the host.
WithContainerFiles(
destinationPath string,
sourcePath string,
options ...*ContainerFilesOptions,
) ContainerResource
destinationPathstringThe destination absolute path in the container.
sourcePathstringThe source path on the host to copy files from.
options...*ContainerFilesOptionsOptional settings, described under Options.

Optional parameters are passed as the existing *ContainerFilesOptions struct.

ContainerResource

The resource builder.

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

Defined on

This method is defined on the following type: