# WithContainerCertificatePaths

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`ContainerResource`](/reference/api/go/aspire.hosting/containerresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Adds container certificate path overrides used for certificate trust at run time.

## Definition

```go
func (ContainerResource) WithContainerCertificatePaths(options ...*WithContainerCertificatePathsOptions) ContainerResource
```

## Parameters

- `options` (`...*WithContainerCertificatePathsOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithContainerCertificatePathsOptions` argument.

- `CustomCertificatesDestination` (`*string`) -- The destination path in the container where custom certificates will be copied.
- `DefaultCertificateBundlePaths` (`[]string`) -- Default certificate bundle paths in the container that will be replaced.
- `DefaultCertificateDirectoryPaths` (`[]string`) -- Default certificate directory paths in the container that may be appended.

## Returns

[`ContainerResource`](/reference/api/go/aspire.hosting/containerresource.md) -- The updated resource builder.

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

## Applies to

- [`ContainerResource`](/reference/api/go/aspire.hosting/containerresource.md)
