# ContainerResource Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ContainerResource](/reference/api/csharp/aspire.hosting/containerresource.md)
- Kind: `Constructors`
- Members: `1`

A resource that represents a specified container.

## ContainerResource(string, string?)

- Name: `Constructor(string, string?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/ContainerResource.cs#L18-L25)

A resource that represents a specified container.

```csharp
public class ContainerResource
{
    public ContainerResource(
        string name,
        string? entrypoint = null)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `entrypoint` (`string?`) `optional`
  An optional container entrypoint.
