| title | Docker Resources |
|---|---|
| description | Configure Docker container resource limits and reservations |
Quick reference for all available Docker resource parameters:
| Parameter | Description |
|---|---|
DOCKER_CPU_LIMIT |
CPU limit in cores |
DOCKER_MEMORY_LIMIT |
Memory limit |
DOCKER_CPU_RESERVATION |
Minimum CPU reservation |
DOCKER_MEMORY_RESERVATION |
Minimum memory reservation |
Maximum CPU allocation for Docker containers in number of cores.
Examples:
2.0- 2 CPU cores (default)4.0- 4 CPU cores for high-performance workloads1.0- 1 CPU core for resource-constrained environments0.5- Half a core (minimum viable)
Maximum memory allocation for Docker containers.
Format:
- Use suffixes:
G(gigabytes),M(megabytes) - Examples:
4G,512M,8G
Examples:
4G- 4 gigabytes (default)8G- 8 gigabytes for video processing workloads2G- 2 gigabytes for lightweight deployments1G- 1 gigabyte (minimum recommended)
Minimum guaranteed CPU allocation for Docker containers.
Examples:
0.5- Half a core guaranteed (default)1.0- 1 CPU core guaranteed2.0- 2 CPU cores guaranteed for critical workloads0.25- Quarter core (minimum)
Minimum guaranteed memory allocation for Docker containers.
Format:
- Use suffixes:
G(gigabytes),M(megabytes) - Examples:
1G,512M,2G
Examples:
1G- 1 gigabyte guaranteed (default)2G- 2 gigabytes guaranteed512M- 512 megabytes (minimum)4G- 4 gigabytes for memory-intensive workloads
DOCKER_CPU_LIMIT=2.0
DOCKER_MEMORY_LIMIT=4G
DOCKER_CPU_RESERVATION=0.5
DOCKER_MEMORY_RESERVATION=1GStandard development configuration with default resource allocations.
DOCKER_CPU_LIMIT=4.0
DOCKER_MEMORY_LIMIT=8G
DOCKER_CPU_RESERVATION=1.0
DOCKER_MEMORY_RESERVATION=2GHigh-performance production setup with increased resources for video processing.
DOCKER_CPU_LIMIT=1.0
DOCKER_MEMORY_LIMIT=2G
DOCKER_CPU_RESERVATION=0.25
DOCKER_MEMORY_RESERVATION=512MMinimal resource configuration for lightweight deployments.
Plan CPU and memory limits based on your workload. Video processing requires more resources than image-only operations. Allocate sufficient memory for video processing. Insufficient memory can cause job failures. Resource limits are enforced by Docker. Setting limits too low can cause container crashes or job failures. Monitor container resource usage and adjust accordingly.