The description "set `-1` to disable swap" is wrong, `build`,
`create` and `run` already fixed, we need to fix `update` as well.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
| ... | ... |
@@ -23,7 +23,7 @@ func (cli *DockerCli) CmdUpdate(args ...string) error {
|
| 23 | 23 |
flCPUShares := cmd.Int64([]string{"#c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
| 24 | 24 |
flMemoryString := cmd.String([]string{"m", "-memory"}, "", "Memory limit")
|
| 25 | 25 |
flMemoryReservation := cmd.String([]string{"-memory-reservation"}, "", "Memory soft limit")
|
| 26 |
- flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Total memory (memory + swap), '-1' to disable swap")
|
|
| 26 |
+ flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Swap limit equal to memory plus swap: '-1' to enable unlimited swap")
|
|
| 27 | 27 |
flKernelMemory := cmd.String([]string{"-kernel-memory"}, "", "Kernel memory limit")
|
| 28 | 28 |
|
| 29 | 29 |
cmd.Require(flag.Min, 1) |
| ... | ... |
@@ -303,7 +303,7 @@ Json Parameters: |
| 303 | 303 |
for the container. |
| 304 | 304 |
- **User** - A string value specifying the user inside the container. |
| 305 | 305 |
- **Memory** - Memory limit in bytes. |
| 306 |
-- **MemorySwap** - Total memory limit (memory + swap); set `-1` to disable swap |
|
| 306 |
+- **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. |
|
| 307 | 307 |
You must use this with `memory` and make the swap value larger than `memory`. |
| 308 | 308 |
- **MemoryReservation** - Memory soft limit in bytes. |
| 309 | 309 |
- **KernelMemory** - Kernel memory limit in bytes. |
| ... | ... |
@@ -1595,7 +1595,7 @@ Query Parameters: |
| 1595 | 1595 |
- **rm** - Remove intermediate containers after a successful build (default behavior). |
| 1596 | 1596 |
- **forcerm** - Always remove intermediate containers (includes `rm`). |
| 1597 | 1597 |
- **memory** - Set memory limit for build. |
| 1598 |
-- **memswap** - Total memory (memory + swap), `-1` to disable swap. |
|
| 1598 |
+- **memswap** - Total memory (memory + swap), `-1` to enable unlimited swap. |
|
| 1599 | 1599 |
- **cpushares** - CPU shares (relative weight). |
| 1600 | 1600 |
- **cpusetcpus** - CPUs in which to allow execution (e.g., `0-3`, `0,1`). |
| 1601 | 1601 |
- **cpuperiod** - The length of a CPU period in microseconds. |
| ... | ... |
@@ -23,7 +23,7 @@ parent = "smn_cli" |
| 23 | 23 |
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) |
| 24 | 24 |
-m, --memory="" Memory limit |
| 25 | 25 |
--memory-reservation="" Memory soft limit |
| 26 |
- --memory-swap="" Total memory (memory + swap), '-1' to disable swap |
|
| 26 |
+ --memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap |
|
| 27 | 27 |
--kernel-memory="" Kernel memory limit: container must be stopped |
| 28 | 28 |
|
| 29 | 29 |
The `docker update` command dynamically updates container resources. Use this |