# DockerfileBuilderCallbackContext

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

Provides context information for Dockerfile build callbacks.

## Definition

```typescript
interface DockerfileBuilderCallbackContext {
  readonly builder: DockerfileBuilder;
  readonly cancellationToken: cancellationToken;
  readonly resource: IResource;
  readonly services: IServiceProvider;
}
```

## Properties

- `builder`: [DockerfileBuilder](/reference/api/typescript/aspire.hosting/dockerfilebuilder.md) `get` -- Gets the Dockerfile builder instance.
- `cancellationToken`: `cancellationToken` `get` -- Gets the cancellation token to observe while waiting for the task to complete.
- `resource`: [IResource](/reference/api/typescript/aspire.hosting/iresource.md) `get` -- Gets the resource being built.
- `services`: `IServiceProvider` `get` -- Gets the service provider for dependency injection.
