# IContainerFilesDestinationResource.PublishWithContainerFiles

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [IContainerFilesDestinationResource](/reference/api/go/aspire.hosting/icontainerfilesdestinationresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures the resource to copy container files from the specified source resource during publishing.

## Definition

```go
type IContainerFilesDestinationResource interface {
    // ... omitted for brevity
    PublishWithContainerFiles(
        source ResourceWithContainerFiles,
        destinationPath string,
    ) IContainerFilesDestinationResource
}
```

## Signature

```go
PublishWithContainerFiles(
    source ResourceWithContainerFiles,
    destinationPath string,
) IContainerFilesDestinationResource
```

## Parameters

- `source` ([`ResourceWithContainerFiles`](/reference/api/go/aspire.hosting/resourcewithcontainerfiles.md)) -- The resource which contains the container files to be copied.
- `destinationPath` (`string`) -- The destination path within the resource's container where the files will be copied.

## Returns

[`IContainerFilesDestinationResource`](/reference/api/go/aspire.hosting/icontainerfilesdestinationresource.md)

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

## Defined on

- [IContainerFilesDestinationResource](/reference/api/go/aspire.hosting/icontainerfilesdestinationresource.md) -- `handle`
