# ContainerBuildOptionsCallbackContext

- 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/ContainerBuildOptionsCallbackAnnotation.cs)

Context for configuring container build options via a callback.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class ContainerBuildOptionsCallbackContext
{
    // ...
}
```

## Constructors

- [ContainerBuildOptionsCallbackContext(IResource, IServiceProvider, ILogger, CancellationToken, DistributedApplicationExecutionContext?)](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/constructors.md#constructor-iresource-iserviceprovider-ilogger-cancellationtoken-distributedapplicationexecutioncontext) -- Initializes a new instance of [ContainerBuildOptionsCallbackContext](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext.md).

## Properties

- [CancellationToken](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#cancellationtoken) : `CancellationToken` `get` -- Gets the cancellation token.
- [Destination](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#destination) : [ContainerImageDestination?](/reference/api/csharp/aspire.hosting/containerimagedestination.md) `get; set` -- Gets or sets the destination for the container image.
- [ExecutionContext](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#executioncontext) : [DistributedApplicationExecutionContext?](/reference/api/csharp/aspire.hosting/distributedapplicationexecutioncontext.md) `get` -- Gets the distributed application execution context.
- [ImageFormat](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#imageformat) : [ContainerImageFormat?](/reference/api/csharp/aspire.hosting/containerimageformat.md) `get; set` -- Gets or sets the container image format.
- [LocalImageName](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#localimagename) : `string?` `get; set` -- Gets or sets the local image name for the built container.
- [LocalImageTag](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#localimagetag) : `string?` `get; set` -- Gets or sets the local image tag for the built container.
- [Logger](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#logger) : `ILogger` `get` -- Gets the logger instance.
- [OutputPath](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#outputpath) : `string?` `get; set` -- Gets or sets the output path for the container archive.
- [Resource](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#resource) : [IResource](/reference/api/csharp/aspire.hosting/iresource.md) `get` -- Gets the resource being built.
- [Services](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#services) : `IServiceProvider` `get` -- Gets the service provider.
- [TargetPlatform](/reference/api/csharp/aspire.hosting/containerbuildoptionscallbackcontext/properties.md#targetplatform) : [ContainerTargetPlatform?](/reference/api/csharp/aspire.hosting/containertargetplatform.md) `get; set` -- Gets or sets the target platform for the container.
