Fix kernel memory updating docs

Specify that kernel memory updating limitation only applies
on kernel version older than 4.6.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2016-07-27 09:03:15 +08:00 committed by Tibor Vass
parent 0ab07d2bd7
commit 69eb98ada5
2 changed files with 23 additions and 15 deletions

View File

@ -37,9 +37,9 @@ limits on a single container or on many. To specify more than one container,
provide space-separated list of container names or IDs.
With the exception of the `--kernel-memory` option, you can specify these
options on a running or a stopped container. You can only update
`--kernel-memory` on a stopped container or on a running container with
kernel memory initialized.
options on a running or a stopped container. On kernel version older than
4.6, you can only update `--kernel-memory` on a stopped container or on
a running container with kernel memory initialized.
## EXAMPLES
@ -66,9 +66,10 @@ $ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse
### Update a container's kernel memory constraints
You can update a container's kernel memory limit using the `--kernel-memory`
option. This option can be updated on a running container only if the container
was started with `--kernel-memory`. If the container was started *without*
`--kernel-memory` you need to stop the container before updating kernel memory.
option. On kernel version older than 4.6, this option can be updated on a
running container only if the container was started with `--kernel-memory`.
If the container was started *without* `--kernel-memory` you need to stop
the container before updating kernel memory.
For example, if you started a container with this command:
@ -92,6 +93,8 @@ Update kernel memory of running container `test2` will fail. You need to stop
the container before updating the `--kernel-memory` setting. The next time you
start it, the container uses the new value.
Kernel version newer than (include) 4.6 does not have this limitation, you
can use `--kernel-memory` the same way as other options.
### Update a container's restart policy

View File

@ -29,9 +29,9 @@ limits on a single container or on many. To specify more than one container,
provide space-separated list of container names or IDs.
With the exception of the **--kernel-memory** option, you can specify these
options on a running or a stopped container. You can only update
**--kernel-memory** on a stopped container or on a running container with
kernel memory initialized.
options on a running or a stopped container. On kernel version older than
4.6, You can only update **--kernel-memory** on a stopped container or on
a running container with kernel memory initialized.
# OPTIONS
@ -59,9 +59,10 @@ kernel memory initialized.
**--kernel-memory**=""
Kernel memory limit (format: `<number>[<unit>]`, where unit = b, k, m or g)
Note that you can not update kernel memory on a running container if the container
is started without kernel memory initialized, in this case, it can only be updated
after it's stopped. The new setting takes effect when the container is started.
Note that on kernel version older than 4.6, you can not update kernel memory on
a running container if the container is started without kernel memory initialized,
in this case, it can only be updated after it's stopped. The new setting takes
effect when the container is started.
**-m**, **--memory**=""
Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
@ -100,9 +101,10 @@ $ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse
### Update a container's kernel memory constraints
You can update a container's kernel memory limit using the **--kernel-memory**
option. This option can be updated on a running container only if the container
was started with **--kernel-memory**. If the container was started *without*
**--kernel-memory** you need to stop the container before updating kernel memory.
option. On kernel version older than 4.6, this option can be updated on a
running container only if the container was started with **--kernel-memory**.
If the container was started *without* **--kernel-memory** you need to stop
the container before updating kernel memory.
For example, if you started a container with this command:
@ -126,6 +128,9 @@ Update kernel memory of running container `test2` will fail. You need to stop
the container before updating the **--kernel-memory** setting. The next time you
start it, the container uses the new value.
Kernel version newer than (include) 4.6 does not have this limitation, you
can use `--kernel-memory` the same way as other options.
### Update a container's restart policy
You can change a container's restart policy on a running container. The new