# ResourceWithContainerFiles.WithContainerFilesSource

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

Adds a container files source annotation to the resource being built, specifying the path to the container files source.

## Definition

```go
type ResourceWithContainerFiles interface {
    // ... omitted for brevity
    WithContainerFilesSource(sourcePath string) ResourceWithContainerFiles
}
```

## Signature

```go
WithContainerFilesSource(sourcePath string) ResourceWithContainerFiles
```

## Parameters

- `sourcePath` (`string`) -- The path to the container files source to associate with the resource. Cannot be null.

## Returns

[`ResourceWithContainerFiles`](/reference/api/go/aspire.hosting/resourcewithcontainerfiles.md) -- The resource builder instance with the container files source annotation applied.

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

## Defined on

- [ResourceWithContainerFiles](/reference/api/go/aspire.hosting/resourcewithcontainerfiles.md) -- `interface`
