Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ this.ctx.container.start({
#### Parameters

- `options` (`object`, conditionally required): Startup options. Required for applications that use the `durable_object` scheduling policy and optional for applications that use the `default` scheduling policy.
- `env` (`Record<string, string>`, optional): Environment variables to pass to the container. Processes started with [`exec()`](#exec) do not receive these variables, except `PATH`.
- `env` (`Record<string, string>`, optional): Environment variables to pass to the container. Each variable can use up to 16,000 UTF-8 bytes for its name and value combined. Refer to [Environment variable limits](/containers/platform/limits/#environment-variable-limits) for the total limit. Processes that you start with [`exec()`](#exec) do not receive these variables, except `PATH`.
- `entrypoint` (`string[]`, optional): Command and arguments to run in the container.
- `enableInternet` (`boolean`, optional): Whether to allow outbound Internet access. Defaults to `false`.
- `image` (`string`, conditionally required) <Badge text="durable_object policy only" variant="note" size="small" />: Image reference to start. Required unless you pass `containerSnapshot`. Pass the [`cloudflare/debian-trixie` managed image](/containers/guides/image-management/#use-the-cloudflare-managed-image) or a value from [`ctx.container.images`](#images).
Expand All @@ -124,6 +124,8 @@ this.ctx.container.start({
- `start()` throws a `RangeError` when a custom `instance` value is missing or invalid.
- `start()` throws an `Error` when `labels` exceed the label limits, when an environment variable name contains `=`, or when an environment variable name or value contains a null character.

If `env` exceeds the per-variable or total size limit, the container fails to start and [`monitor()`](#monitor) rejects.

### `inspect`

`inspect()` returns the image and labels for a running container. It returns `null` when no container is running.
Expand Down
13 changes: 13 additions & 0 deletions src/content/docs/containers/platform/limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ The following limits apply per account:

[^1]: Delete a tagged container image with [`wrangler containers images delete IMAGE:TAG`](/workers/wrangler/commands/containers/#containers-images-delete) to free up space. If you delete a container image and then [roll back](/workers/versions-and-deployments/rollbacks/) your Worker to a previous version, this version may no longer work.

## Environment variable limits

The following limits apply to variables you pass in the `env` option of [`ctx.container.start()`](/containers/api/durable-object-container/#start):

| Scope | Limit |
| ------------------------- | ------------- |
| Each environment variable | 16,000 bytes |
| All environment variables | 640,000 bytes |

To calculate a variable's size, add the UTF-8 byte lengths of its name and value. Do not count the `=` separator. The total is the sum of those sizes.

For larger payloads, pass an identifier in `env`. Send the payload to the running container through [standard input with `exec()`](/containers/guides/execute-commands/#send-standard-input).

## Outbound HTTP request body size

Cloudflare limits each HTTP request body forwarded from a Container to an external service through an [outbound handler](/containers/configuration/outbound-traffic/) to **100 MiB by default**.
Expand Down