github.com/vincentwoo/docker@v0.7.3-0.20160116130405-82401a4b13c0/man/docker-update.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JUNE 2014 4 # NAME 5 docker-update - Update resource configs of one or more containers 6 7 # SYNOPSIS 8 **docker update** 9 [**--blkio-weight**[=*[BLKIO-WEIGHT]*]] 10 [**--cpu-shares**[=*0*]] 11 [**--cpu-period**[=*0*]] 12 [**--cpu-quota**[=*0*]] 13 [**--cpuset-cpus**[=*CPUSET-CPUS*]] 14 [**--cpuset-mems**[=*CPUSET-MEMS*]] 15 [**--help**] 16 [**--kernel-memory**[=*KERNEL-MEMORY*]] 17 [**-m**|**--memory**[=*MEMORY*]] 18 [**--memory-reservation**[=*MEMORY-RESERVATION*]] 19 [**--memory-swap**[=*MEMORY-SWAP*]] 20 CONTAINER [CONTAINER...] 21 22 # DESCRIPTION 23 24 The `docker update` command dynamically updates container resources. Use this 25 command to prevent containers from consuming too many resources from their 26 Docker host. With a single command, you can place limits on a single 27 container or on many. To specify more than one container, provide 28 space-separated list of container names or IDs. 29 30 With the exception of the `--kernel-memory` value, you can specify these 31 options on a running or a stopped container. You can only update 32 `--kernel-memory` on a stopped container. When you run `docker update` on 33 stopped container, the next time you restart it, the container uses those 34 values. 35 36 # OPTIONS 37 **--blkio-weight**=0 38 Block IO weight (relative weight) accepts a weight value between 10 and 1000. 39 40 **--cpu-shares**=0 41 CPU shares (relative weight) 42 43 **--cpu-period**=0 44 Limit the CPU CFS (Completely Fair Scheduler) period 45 46 **--cpu-quota**=0 47 Limit the CPU CFS (Completely Fair Scheduler) quota 48 49 **--cpuset-cpus**="" 50 CPUs in which to allow execution (0-3, 0,1) 51 52 **--cpuset-mems**="" 53 Memory nodes(MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. 54 55 **--help** 56 Print usage statement 57 58 **--kernel-memory**="" 59 Kernel memory limit (format: `<number>[<unit>]`, where unit = b, k, m or g) 60 61 Note that you can not update kernel memory to a running container, it can only 62 be updated to a stopped container, and affect after it's started. 63 64 **-m**, **--memory**="" 65 Memory limit (format: <number><optional unit>, where unit = b, k, m or g) 66 67 **--memory-reservation**="" 68 Memory soft limit (format: <number>[<unit>], where unit = b, k, m or g) 69 70 **--memory-swap**="" 71 Total memory limit (memory + swap) 72 73 # EXAMPLES 74 75 The following sections illustrate ways to use this command. 76 77 ### Update a container with cpu-shares=512 78 79 To limit a container's cpu-shares to 512, first identify the container 80 name or ID. You can use **docker ps** to find these values. You can also 81 use the ID returned from the **docker run** command. Then, do the following: 82 83 ```bash 84 $ docker update --cpu-shares 512 abebf7571666 85 ``` 86 87 ### Update a container with cpu-shares and memory 88 89 To update multiple resource configurations for multiple containers: 90 91 ```bash 92 $ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse 93 ```