|
1 .TH "DOCKER" "1" " Docker User Manuals" "Docker Community" "JUNE 2014" "" |
|
2 |
|
3 |
|
4 .SH NAME |
|
5 .PP |
|
6 docker\-update \- Update resource configs of one or more containers |
|
7 |
|
8 |
|
9 .SH SYNOPSIS |
|
10 .PP |
|
11 \fBdocker update\fP |
|
12 [\fB\-\-blkio\-weight\fP[=\fI[BLKIO\-WEIGHT]\fP]] |
|
13 [\fB\-\-cpu\-shares\fP[=\fI0\fP]] |
|
14 [\fB\-\-cpu\-period\fP[=\fI0\fP]] |
|
15 [\fB\-\-cpu\-quota\fP[=\fI0\fP]] |
|
16 [\fB\-\-cpuset\-cpus\fP[=\fICPUSET\-CPUS\fP]] |
|
17 [\fB\-\-cpuset\-mems\fP[=\fICPUSET\-MEMS\fP]] |
|
18 [\fB\-\-help\fP] |
|
19 [\fB\-\-kernel\-memory\fP[=\fIKERNEL\-MEMORY\fP]] |
|
20 [\fB\-m\fP|\fB\-\-memory\fP[=\fIMEMORY\fP]] |
|
21 [\fB\-\-memory\-reservation\fP[=\fIMEMORY\-RESERVATION\fP]] |
|
22 [\fB\-\-memory\-swap\fP[=\fIMEMORY\-SWAP\fP]] |
|
23 CONTAINER [CONTAINER...] |
|
24 |
|
25 |
|
26 .SH DESCRIPTION |
|
27 .PP |
|
28 The \fB\fCdocker update\fR command dynamically updates container resources. Use this |
|
29 command to prevent containers from consuming too many resources from their |
|
30 Docker host. With a single command, you can place limits on a single |
|
31 container or on many. To specify more than one container, provide |
|
32 space\-separated list of container names or IDs. |
|
33 |
|
34 .PP |
|
35 With the exception of the \fB\fC\-\-kernel\-memory\fR value, you can specify these |
|
36 options on a running or a stopped container. You can only update |
|
37 \fB\fC\-\-kernel\-memory\fR on a stopped container. When you run \fB\fCdocker update\fR on |
|
38 stopped container, the next time you restart it, the container uses those |
|
39 values. |
|
40 |
|
41 |
|
42 .SH OPTIONS |
|
43 .PP |
|
44 \fB\-\-blkio\-weight\fP=0 |
|
45 Block IO weight (relative weight) accepts a weight value between 10 and 1000. |
|
46 |
|
47 .PP |
|
48 \fB\-\-cpu\-shares\fP=0 |
|
49 CPU shares (relative weight) |
|
50 |
|
51 .PP |
|
52 \fB\-\-cpu\-period\fP=0 |
|
53 Limit the CPU CFS (Completely Fair Scheduler) period |
|
54 |
|
55 .PP |
|
56 \fB\-\-cpu\-quota\fP=0 |
|
57 Limit the CPU CFS (Completely Fair Scheduler) quota |
|
58 |
|
59 .PP |
|
60 \fB\-\-cpuset\-cpus\fP="" |
|
61 CPUs in which to allow execution (0\-3, 0,1) |
|
62 |
|
63 .PP |
|
64 \fB\-\-cpuset\-mems\fP="" |
|
65 Memory nodes(MEMs) in which to allow execution (0\-3, 0,1). Only effective on NUMA systems. |
|
66 |
|
67 .PP |
|
68 \fB\-\-help\fP |
|
69 Print usage statement |
|
70 |
|
71 .PP |
|
72 \fB\-\-kernel\-memory\fP="" |
|
73 Kernel memory limit (format: \fB\fC<number>[<unit>]\fR, where unit = b, k, m or g) |
|
74 |
|
75 .PP |
|
76 Note that you can not update kernel memory to a running container, it can only |
|
77 be updated to a stopped container, and affect after it's started. |
|
78 |
|
79 .PP |
|
80 \fB\-m\fP, \fB\-\-memory\fP="" |
|
81 Memory limit (format: <number><optional unit>, where unit = b, k, m or g) |
|
82 |
|
83 .PP |
|
84 \fB\-\-memory\-reservation\fP="" |
|
85 Memory soft limit (format: <number>[<unit>], where unit = b, k, m or g) |
|
86 |
|
87 .PP |
|
88 \fB\-\-memory\-swap\fP="" |
|
89 Total memory limit (memory + swap) |
|
90 |
|
91 |
|
92 .SH EXAMPLES |
|
93 .PP |
|
94 The following sections illustrate ways to use this command. |
|
95 |
|
96 .SS Update a container with cpu\-shares=512 |
|
97 .PP |
|
98 To limit a container's cpu\-shares to 512, first identify the container |
|
99 name or ID. You can use \fBdocker ps\fP to find these values. You can also |
|
100 use the ID returned from the \fBdocker run\fP command. Then, do the following: |
|
101 |
|
102 .PP |
|
103 .RS |
|
104 |
|
105 .nf |
|
106 $ docker update \-\-cpu\-shares 512 abebf7571666 |
|
107 |
|
108 .fi |
|
109 .RE |
|
110 |
|
111 .SS Update a container with cpu\-shares and memory |
|
112 .PP |
|
113 To update multiple resource configurations for multiple containers: |
|
114 |
|
115 .PP |
|
116 .RS |
|
117 |
|
118 .nf |
|
119 $ docker update \-\-cpu\-shares 512 \-m 300M abebf7571666 hopeful\_morse |
|
120 |
|
121 .fi |
|
122 .RE |