# runAsContainer

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

Configures an Azure PostgreSQL Flexible Server resource to run locally in a container.

## Definition

```typescript
interface AzurePostgresFlexibleServerResource {
  // ... omitted for brevity
  runAsContainer(configureContainer?: (obj: PostgresServerResource) => Promise<void>): AzurePostgresFlexibleServerResource
}
```

## Parameters

- `configureContainer` (`(obj: PostgresServerResource) => Promise<void>`) `optional`

## Returns

[AzurePostgresFlexibleServerResource](/reference/api/typescript/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md) `builder`

## Applies to

- [AzurePostgresFlexibleServerResource](/reference/api/typescript/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md)
