github.com/dpiddy/docker@v1.12.2-rc1/man/docker-update.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JUNE 2014 4 # NAME 5 docker-update - Update configuration 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 [**--restart**[=*""*]] 21 CONTAINER [CONTAINER...] 22 23 # DESCRIPTION 24 25 The `docker update` command dynamically updates container configuration. 26 you can Use this command to prevent containers from consuming too many 27 resources from their Docker host. With a single command, you can place 28 limits on a single container or on many. To specify more than one container, 29 provide space-separated list of container names or IDs. 30 31 With the exception of the `--kernel-memory` value, you can specify these 32 options on a running or a stopped container. You can only update 33 `--kernel-memory` on a stopped container. When you run `docker update` on 34 stopped container, the next time you restart it, the container uses those 35 values. 36 37 Another configuration you can change with this command is restart policy, 38 new restart policy will take effect instantly after you run `docker update` 39 on a container. 40 41 # OPTIONS 42 **--blkio-weight**=0 43 Block IO weight (relative weight) accepts a weight value between 10 and 1000. 44 45 **--cpu-shares**=0 46 CPU shares (relative weight) 47 48 **--cpu-period**=0 49 Limit the CPU CFS (Completely Fair Scheduler) period 50 51 **--cpu-quota**=0 52 Limit the CPU CFS (Completely Fair Scheduler) quota 53 54 **--cpuset-cpus**="" 55 CPUs in which to allow execution (0-3, 0,1) 56 57 **--cpuset-mems**="" 58 Memory nodes(MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. 59 60 **--help** 61 Print usage statement 62 63 **--kernel-memory**="" 64 Kernel memory limit (format: `<number>[<unit>]`, where unit = b, k, m or g) 65 66 Note that you can not update kernel memory to a running container, it can only 67 be updated to a stopped container, and affect after it's started. 68 69 **-m**, **--memory**="" 70 Memory limit (format: <number><optional unit>, where unit = b, k, m or g) 71 72 **--memory-reservation**="" 73 Memory soft limit (format: <number>[<unit>], where unit = b, k, m or g) 74 75 **--memory-swap**="" 76 Total memory limit (memory + swap) 77 78 **--restart**="" 79 Restart policy to apply when a container exits (no, on-failure[:max-retry], always, unless-stopped). 80 81 # EXAMPLES 82 83 The following sections illustrate ways to use this command. 84 85 ### Update a container with cpu-shares=512 86 87 To limit a container's cpu-shares to 512, first identify the container 88 name or ID. You can use **docker ps** to find these values. You can also 89 use the ID returned from the **docker run** command. Then, do the following: 90 91 ```bash 92 $ docker update --cpu-shares 512 abebf7571666 93 ``` 94 95 ### Update a container with cpu-shares and memory 96 97 To update multiple resource configurations for multiple containers: 98 99 ```bash 100 $ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse 101 ``` 102 103 ### Update a container's restart policy 104 105 To update restart policy for one or more containers: 106 ```bash 107 $ docker update --restart=on-failure:3 abebf7571666 hopeful_morse 108 ```