github.com/endocode/docker@v1.4.2-0.20160113120958-46eb4700391e/docs/reference/commandline/update.md (about) 1 <!--[metadata]> 2 +++ 3 title = "update" 4 description = "The update command description and usage" 5 keywords = ["resources, update, dynamically"] 6 [menu.main] 7 parent = "smn_cli" 8 +++ 9 <![end-metadata]--> 10 11 ## update 12 13 Usage: docker update [OPTIONS] CONTAINER [CONTAINER...] 14 15 Updates container resource limits 16 17 --help=false Print usage 18 --blkio-weight=0 Block IO (relative weight), between 10 and 1000 19 --cpu-shares=0 CPU shares (relative weight) 20 --cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period 21 --cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota 22 --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) 23 --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) 24 -m, --memory="" Memory limit 25 --memory-reservation="" Memory soft limit 26 --memory-swap="" Total memory (memory + swap), '-1' to disable swap 27 --kernel-memory="" Kernel memory limit: container must be stopped 28 29 The `docker update` command dynamically updates container resources. Use this 30 command to prevent containers from consuming too many resources from their 31 Docker host. With a single command, you can place limits on a single 32 container or on many. To specify more than one container, provide 33 space-separated list of container names or IDs. 34 35 With the exception of the `--kernel-memory` value, you can specify these 36 options on a running or a stopped container. You can only update 37 `--kernel-memory` on a stopped container. When you run `docker update` on 38 stopped container, the next time you restart it, the container uses those 39 values. 40 41 ## EXAMPLES 42 43 The following sections illustrate ways to use this command. 44 45 ### Update a container with cpu-shares=512 46 47 To limit a container's cpu-shares to 512, first identify the container 48 name or ID. You can use **docker ps** to find these values. You can also 49 use the ID returned from the **docker run** command. Then, do the following: 50 51 ```bash 52 $ docker update --cpu-shares 512 abebf7571666 53 ``` 54 55 ### Update a container with cpu-shares and memory 56 57 To update multiple resource configurations for multiple containers: 58 59 ```bash 60 $ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse 61 ```