Skip to main content

Parameter Reference

Quick reference for all available Docker resource parameters:
ParameterDescription
DOCKER_CPU_LIMITCPU limit in cores
DOCKER_MEMORY_LIMITMemory limit
DOCKER_CPU_RESERVATIONMinimum CPU reservation
DOCKER_MEMORY_RESERVATIONMinimum memory reservation

Resource Limits

DOCKER_CPU_LIMIT
number
default:"2.0"
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 workloads
  • 1.0 - 1 CPU core for resource-constrained environments
  • 0.5 - Half a core (minimum viable)
This is a hard limit. Containers cannot exceed this CPU allocation even if resources are available.
DOCKER_MEMORY_LIMIT
string
default:"4G"
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 workloads
  • 2G - 2 gigabytes for lightweight deployments
  • 1G - 1 gigabyte (minimum recommended)
Setting memory too low can cause container crashes. Ensure sufficient memory for your workload, especially for video processing.

Resource Reservations

DOCKER_CPU_RESERVATION
number
default:"0.5"
Minimum guaranteed CPU allocation for Docker containers.Examples:
  • 0.5 - Half a core guaranteed (default)
  • 1.0 - 1 CPU core guaranteed
  • 2.0 - 2 CPU cores guaranteed for critical workloads
  • 0.25 - Quarter core (minimum)
Reservations ensure containers always have access to a minimum amount of resources, even under high load.
DOCKER_MEMORY_RESERVATION
string
default:"1G"
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 guaranteed
  • 512M - 512 megabytes (minimum)
  • 4G - 4 gigabytes for memory-intensive workloads
Reservations should be lower than limits. They ensure containers have minimum resources available.

Configuration Examples

DOCKER_CPU_LIMIT=2.0
DOCKER_MEMORY_LIMIT=4G
DOCKER_CPU_RESERVATION=0.5
DOCKER_MEMORY_RESERVATION=1G
Standard development configuration with default resource allocations.

Best Practices

Resource planning

Plan CPU and memory limits based on your workload. Video processing requires more resources than image-only operations.

Memory allocation

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.