docker-update - Man Page
Update configuration of one or more containers
Examples (TL;DR)
- Update restart policy to apply when a specific container exits:
docker update --restart=always|no|on-failure|unless-stopped container_name
- Update the policy to restart up to three times a specific container when it exits with non-zero exit status:
docker update --restart=on-failure:3 container_name
- Update the number of CPUs available to a specific container:
docker update --cpus count container_name
- Update the memory limit in [M]egabytes for a specific container:
docker update --memory limitM container_name
- Update the maximum number of process IDs allowed inside a specific container (use
-1
for unlimited):docker update --pids-limit count container_name
- Update the amount of memory in [M]egabytes a specific container can swap to disk (use
-1
for unlimited):docker update --memory-swap limitM container_name
Synopsis
docker update [Options] CONTAINER [CONTAINER...]
Description
Alias for docker container update.
Options
--blkio-weight=0 Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota
--cpu-rt-period=0 Limit the CPU real-time period in microseconds
--cpu-rt-runtime=0 Limit the CPU real-time runtime in microseconds
-c, --cpu-shares=0 CPU shares (relative weight)
--cpus= Number of CPUs
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems="" MEMs in which to allow execution (0-3, 0,1)
-h, --help[=false] help for update
-m, --memory=0 Memory limit
--memory-reservation=0 Memory soft limit
--memory-swap=0 Swap limit equal to memory plus swap: -1 to enable unlimited swap
--pids-limit=0 Tune container pids limit (set -1 for unlimited)
--restart="" Restart policy to apply when a container exits