mirror of https://github.com/docker/cli.git
Fix update memory without memoryswap
The memory should always be smaller than memoryswap, we should error out with message that user know how to do rather than just an invalid argument error if user update the memory limit bigger than already set memory swap. Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
parent
7a4dfc4a33
commit
3b2ecd7052
|
@ -67,6 +67,12 @@ a running container with kernel memory initialized.
|
||||||
**-m**, **--memory**=""
|
**-m**, **--memory**=""
|
||||||
Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
||||||
|
|
||||||
|
Note that the memory should be smaller than the already set swap memory limit.
|
||||||
|
If you want update a memory limit bigger than the already set swap memory limit,
|
||||||
|
you should update swap memory limit at the same time. If you don't set swap memory
|
||||||
|
limit on docker create/run but only memory limit, the swap memory is double
|
||||||
|
the memory limit.
|
||||||
|
|
||||||
**--memory-reservation**=""
|
**--memory-reservation**=""
|
||||||
Memory soft limit (format: <number>[<unit>], where unit = b, k, m or g)
|
Memory soft limit (format: <number>[<unit>], where unit = b, k, m or g)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue