Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithContainerFiles

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

Applies to

This method applies to the following types: