# DockerfileBuilderCallbackContext

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/DockerfileBuilderCallbackContext.cs)

Provides context information for Dockerfile build callbacks.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class DockerfileBuilderCallbackContext
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting/DockerfileBuilderCallbackContext`
- Public instance properties are exported as ATS capabilities.

## Constructors

- [DockerfileBuilderCallbackContext(IResource, DockerfileBuilder, IServiceProvider, CancellationToken)](/reference/api/csharp/aspire.hosting/dockerfilebuildercallbackcontext/constructors.md#constructor-iresource-dockerfilebuilder-iserviceprovider-cancellationtoken) -- Initializes a new instance of the [DockerfileBuilderCallbackContext](/reference/api/csharp/aspire.hosting/dockerfilebuildercallbackcontext.md) class.

## Properties

- [Builder](/reference/api/csharp/aspire.hosting/dockerfilebuildercallbackcontext/properties.md#builder) : [DockerfileBuilder](/reference/api/csharp/aspire.hosting/dockerfilebuilder.md) `get` -- Gets the Dockerfile builder instance.
- [CancellationToken](/reference/api/csharp/aspire.hosting/dockerfilebuildercallbackcontext/properties.md#cancellationtoken) : `CancellationToken` `get` -- Gets the cancellation token to observe while waiting for the task to complete.
- [Resource](/reference/api/csharp/aspire.hosting/dockerfilebuildercallbackcontext/properties.md#resource) : [IResource](/reference/api/csharp/aspire.hosting/iresource.md) `get` -- Gets the resource being built.
- [Services](/reference/api/csharp/aspire.hosting/dockerfilebuildercallbackcontext/properties.md#services) : `IServiceProvider` `get` -- Gets the service provider for dependency injection.
