# Config

- Kind: `class`
- Package: [Aspire.Hosting.Docker](/reference/api/csharp/aspire.hosting.docker.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.Docker.Resources.ComposeNodes`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Docker/Resources/ComposeNodes/Config.cs)
- Inherits: [NamedComposeMember](/reference/api/csharp/aspire.hosting.docker/namedcomposemember.md)

Represents a configuration object in a Docker Compose file.

## Definition

```csharp
namespace Aspire.Hosting.Docker.Resources.ComposeNodes;

public sealed class Config
    : Aspire.Hosting.Docker.Resources.ComposeNodes.NamedComposeMember
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Docker/Config`

## Remarks

This class models a configuration entry within a Docker Compose file, such as file-based or external configurations. It includes properties to define the source file, external flag, custom name, and additional labels for the configuration.

## Constructors

- [Config](/reference/api/csharp/aspire.hosting.docker/config/constructors.md#constructor)

## Properties

- [Content](/reference/api/csharp/aspire.hosting.docker/config/properties.md#content) : `string?` `get; set` -- Gets or sets the contents of the configuration file. This property is used to specify the actual configuration data that will be included in the Docker Compose file.
- [External](/reference/api/csharp/aspire.hosting.docker/config/properties.md#external) : `bool?` `get; set` -- Indicates whether the configuration is external to the current project context. When set to true, the configuration will not be managed or created by the Compose file; instead, it references an existing resource outside the current scope. If null, the external status is not explicitly specified.
- [File](/reference/api/csharp/aspire.hosting.docker/config/properties.md#file) : `string?` `get; set` -- Gets or sets the path to the configuration file. This property is used to specify the file containing the configuration data for the service or component.
- [Labels](/reference/api/csharp/aspire.hosting.docker/config/properties.md#labels) : `Dictionary<string, string>` `get; set` -- Represents a collection of key-value pairs used as metadata for configuration objects. The labels provide additional descriptive information, which can be utilized for tagging, grouping, or identification purposes.
