# ContainerBuildOptionsCallbackContext

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.5.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/e076d8e427cb3afb528dbd605acd74c3aea69f94)

Context for configuring container build options via a callback.

## Definition

```typescript
interface ContainerBuildOptionsCallbackContext {
  readonly cancellationToken: cancellationToken;
  destination: ContainerImageDestination;
  readonly executionContext: DistributedApplicationExecutionContext;
  imageFormat: ContainerImageFormat;
  localImageName: string;
  localImageTag: string;
  readonly logger: ILogger;
  outputPath: string;
  readonly resource: IResource;
  readonly services: IServiceProvider;
  targetPlatform: ContainerTargetPlatform;
}
```

## Properties

- `cancellationToken`: `cancellationToken` `get` -- Gets the cancellation token.
- `destination`: [ContainerImageDestination](/reference/api/typescript/aspire.hosting/containerimagedestination.md) `get - set` -- Gets or sets the destination for the container image.
- `executionContext`: [DistributedApplicationExecutionContext](/reference/api/typescript/aspire.hosting/distributedapplicationexecutioncontext.md) `get` -- Gets the distributed application execution context.
- `imageFormat`: [ContainerImageFormat](/reference/api/typescript/aspire.hosting/containerimageformat.md) `get - set` -- Gets or sets the container image format.
- `localImageName`: `string` `get - set` -- Gets or sets the local image name for the built container.
- `localImageTag`: `string` `get - set` -- Gets or sets the local image tag for the built container.
- `logger`: `ILogger` `get` -- Gets the logger instance.
- `outputPath`: `string` `get - set` -- Gets or sets the output path for the container archive.
- `resource`: [IResource](/reference/api/typescript/aspire.hosting/iresource.md) `get` -- Gets the resource being built.
- `services`: `IServiceProvider` `get` -- Gets the service provider.
- `targetPlatform`: [ContainerTargetPlatform](/reference/api/typescript/aspire.hosting/containertargetplatform.md) `get - set` -- Gets or sets the target platform for the container.
