# ContainerResource.withContainerRuntimeArgs

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Defined on: [ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md)
- Version: `13.4.0`
- Kind: `method`

Adds a callback to be executed with a list of arguments to add to the container runtime run command when a container resource is started.

## Definition

```typescript
interface ContainerResource {
  // ... omitted for brevity
  withContainerRuntimeArgs(args: string[]): ContainerResource;
}
```

## Signature

```typescript
withContainerRuntimeArgs(args: string[]): ContainerResource
```

## Parameters

- `args` (`string[]`)

## Returns

[ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md) `builder`

## Defined on

- [ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md) -- `handle`
