Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0bfe2f4
Document raw Containers API alongside Container class
thomasgauvin Aug 28, 2026
9a1b137
Clarify Durable Object alarm method
thomasgauvin Aug 28, 2026
7ce4abe
[Containers] Separate outbound traffic IA from API docs
thomasgauvin Sep 23, 2026
6cfbf88
[Containers] Validate API examples and preserve redirects
thomasgauvin Sep 23, 2026
7616d6a
[Containers] Clarify recommended API guidance
thomasgauvin Sep 23, 2026
74539ca
[Containers] Remove redundant API description heading
thomasgauvin Sep 23, 2026
fc9b549
[Containers] Clarify Durable Object proxying
thomasgauvin Sep 23, 2026
8cbeb18
[Containers] Highlight recommended API in note
thomasgauvin Sep 23, 2026
e5f5305
[Containers] Explain Durable Object benefits for containers
thomasgauvin Sep 23, 2026
e2a2330
[Containers] Focus API docs on migration and navigation
thomasgauvin Sep 25, 2026
741f4a9
[Containers] Separate API examples from navigation changes
thomasgauvin Sep 25, 2026
ce48c61
[Containers] Recommend direct API for new applications
thomasgauvin Sep 25, 2026
feaeda3
[Containers] Clarify direct API reference
thomasgauvin Sep 28, 2026
b387f20
[Containers] Use exports in Wrangler configuration
thomasgauvin Sep 28, 2026
484ad63
[Containers] Address API documentation review
thomasgauvin Sep 28, 2026
83a51a4
[Containers] Correct Durable Object API types
thomasgauvin Sep 28, 2026
d4a0bc0
[Containers] Remove API coverage note
thomasgauvin Sep 28, 2026
4036e57
[Containers] Scope Durable Object API reference
thomasgauvin Sep 28, 2026
c5b8756
[Containers] Add migration guide and workbench
thomasgauvin Sep 28, 2026
41d14e7
[Containers] Simplify API code examples
thomasgauvin Sep 28, 2026
393ee91
[Containers] Preserve outbound traffic configuration path
thomasgauvin Sep 28, 2026
5111fa2
Remove incremental migration guidance
thomasgauvin Sep 28, 2026
14e38b2
Remove migration workbench from docs PR
thomasgauvin Sep 28, 2026
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
12 changes: 8 additions & 4 deletions public/__redirects
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,14 @@
/constellation/ /workers-ai/ 301
# Containers
/containers/beta-info/ /containers/faq/ 301
/containers/container-package/ /containers/reference/container-class/ 301
/containers/durable-object-methods/ /durable-objects/api/container/ 301
# Containers API
/containers/container-package/ /containers/api/container-class/ 301
/containers/durable-object-methods/ /containers/api/durable-object-container/ 301
/containers/container-class/ /containers/api/container-class/ 301
/containers/reference/container-class/ /containers/api/container-class/ 301
/containers/reference/durable-object-methods/ /containers/api/durable-object-container/ 301
/durable-objects/api/container/ /containers/api/durable-object-container/ 301
# Containers IA rework: loose pages folded into core sections
/containers/container-class/ /containers/reference/container-class/ 301
/containers/local-dev/ /containers/guides/local-dev/ 301
/containers/deploy/ /containers/guides/deploy/ 301
/containers/execute-commands/ /containers/guides/execute-commands/ 301
Expand All @@ -663,7 +667,7 @@
/containers/platform-details/scaling-and-routing/ /containers/configuration/scaling-and-routing/ 301
/containers/platform-details/limits/ /containers/platform/limits/ 301
/containers/platform-details/image-management/ /containers/guides/image-management/ 301
/containers/platform-details/durable-object-methods/ /durable-objects/api/container/ 301
/containers/platform-details/durable-object-methods/ /containers/api/durable-object-container/ 301
/containers/platform-details/ /containers/concepts/architecture/ 301
# Containers IA rework: Configuration section + Local Development to Guides + Wrangler pages to Reference
/containers/guides/outbound-traffic/ /containers/configuration/outbound-traffic/ 301
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
pcx_content_type: reference
title: Container Interface
title: Container class
sidebar:
order: 1
description: API reference for the Container interface and utility functions
order: 2
description: API reference for the Container class and its built-in lifecycle helpers.
products:
- containers
---

import { PackageManagers, TypeScriptExample } from "~/components";

The [`Container` class](https://github.com/cloudflare/containers) from [`@cloudflare/containers`](https://www.npmjs.com/package/@cloudflare/containers) is the most common way to interact with container instances from a Worker.
The [`Container` class](https://github.com/cloudflare/containers) from [`@cloudflare/containers`](https://www.npmjs.com/package/@cloudflare/containers) provides lifecycle helpers for container instances. For direct lifecycle control, use the [Durable Object Container API](/containers/api/durable-object-container/).

To move an existing application to direct control, refer to [Migrate to the Durable Object Container API](/containers/guides/migrate-to-durable-object-container-api/).

**`Container` extends [`DurableObject`](/durable-objects/api/base/).** The Durable Object manages routing, persistent state, and lifecycle hooks, while the container process runs your image inside a Linux VM. Because your subclass is a Durable Object, you have access to the full Durable Object API — including [`this.ctx.storage`](/durable-objects/api/sqlite-storage-api/) for persistent SQLite-backed storage and [`this.ctx.id`](/durable-objects/api/id/) for the unique instance identifier. Use Durable Object storage to persist state that should survive container restarts, such as configuration, user data, or task results.

Expand Down
Loading
Loading