Skip to main content

Container

Deploy and manage container applications on Cloudflare’s global network.

Container Binding

Creates a Container binding for use in Cloudflare Workers.

Props

string
required
The class name for the container binding.
object
Docker build configuration.
string
Pre-built image reference (alternative to build).
number
default:"10"
Maximum number of container instances that can be running.
InstanceType
default:"dev"
Instance type determining compute resources.Options: lite, dev, basic, standard, standard-1, standard-2, standard-3, standard-4

Output

string
Unique identifier for the container.
string
Class name used to identify the container in Worker bindings.
Image
Docker image configuration for the container.
container
Type identifier for the binding.

Example

ContainerApplication

Deploy a managed container application with automatic scaling.

Props

string
The name of the container application.
Image
required
The Docker image to deploy in the container application.
number
default:"1"
The initial number of container instances to deploy.
number
default:"1"
The maximum number of instances to be used for the deployment.
InstanceType
default:"dev"
The instance type to be used for the deployment.
SchedulingPolicy
default:"default"
Scheduling policy that controls container placement.Options: moon, gpu, regional, fill_metals, default
ContainerApplicationRollout
Configuration for progressive rollout when updating.
boolean
default:"false"
Whether to adopt an existing container application with the same name.

Output

string
Unique identifier for the container application.
string
Human-readable name of the container application.

Examples

Simple Web Application

GPU-Enabled AI Application

Container with Durable Objects

Progressive Rollout