# AzurePostgresFlexibleServerResource.runAsContainer

- Module: [Aspire.Hosting.Azure.PostgreSQL](/reference/api/typescript/aspire.hosting.azure.postgresql.md)
- Defined on: [AzurePostgresFlexibleServerResource](/reference/api/typescript/aspire.hosting.azure.postgresql/azurepostgresflexibleserverresource.md)
- Version: `13.4.0`
- Kind: `method`

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;
}
```

## Signature

```typescript
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`

## Defined on

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