From 97a505519860bc3bcb6263423f0d92be7891e84a Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Mon, 18 Apr 2016 21:15:33 -0700 Subject: [PATCH] Docs: Container creation param descriptions not under HostConfig This fix tries to fix issues mentioned in #22100 for incorrect description of remote API's container creation params. Several issues have been fixed: 1. CPU and memory related params (e.g., `MemorySwap`, `CpuShares`, etc.) were incorrectly placed under the top level instead of under the HostConfig. (v1.18-v1.24) 2. The param `Cpuset` has been deprecated but was never removed. (v1.18-v1.24) 3. The param `PidsLimit` was not added even though the description has been added. (v1.23-v1.24) This fix fixes #22100 Signed-off-by: Yong Tang (cherry picked from commit 332e3b545b0c0e825364c0f09315f82546c791f0) Signed-off-by: Sebastiaan van Stijn --- docs/reference/api/docker_remote_api_v1.18.md | 13 +++-- docs/reference/api/docker_remote_api_v1.19.md | 23 ++++---- docs/reference/api/docker_remote_api_v1.20.md | 25 +++++---- docs/reference/api/docker_remote_api_v1.21.md | 29 +++++------ docs/reference/api/docker_remote_api_v1.22.md | 49 +++++++++-------- docs/reference/api/docker_remote_api_v1.23.md | 52 +++++++++---------- 6 files changed, 93 insertions(+), 98 deletions(-) diff --git a/docs/reference/api/docker_remote_api_v1.18.md b/docs/reference/api/docker_remote_api_v1.18.md index dc122aabf0..b4b8970c59 100644 --- a/docs/reference/api/docker_remote_api_v1.18.md +++ b/docs/reference/api/docker_remote_api_v1.18.md @@ -206,13 +206,6 @@ Json Parameters: - **Domainname** - A string value containing the desired domain name to use for the container. - **User** - A string value containing the user to use inside the container. -- **Memory** - Memory limit in bytes. -- **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. - You must use this with `memory` and make the swap value larger than `memory`. -- **CpuShares** - An integer value containing the CPU Shares for container - (ie. the relative weight vs other containers). -- **Cpuset** - The same as CpusetCpus, but deprecated, please don't use. -- **CpusetCpus** - String value containing the cgroups CpusetCpus to use. - **AttachStdin** - Boolean value, attaches to stdin. - **AttachStdout** - Boolean value, attaches to stdout. - **AttachStderr** - Boolean value, attaches to stderr. @@ -243,6 +236,12 @@ Json Parameters: in the form of `container_name:alias`. - **LxcConf** - LXC specific configurations. These configurations will only work when using the `lxc` execution driver. + - **Memory** - Memory limit in bytes. + - **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. + You must use this with `memory` and make the swap value larger than `memory`. + - **CpuShares** - An integer value containing the CPU Shares for container + (ie. the relative weight vs other containers). + - **CpusetCpus** - String value containing the cgroups CpusetCpus to use. - **PortBindings** - A map of exposed container ports and the host port they should map to. It should be specified in the form `{ /: [{ "HostPort": "" }] }` diff --git a/docs/reference/api/docker_remote_api_v1.19.md b/docs/reference/api/docker_remote_api_v1.19.md index 16995d93e5..3d44813a31 100644 --- a/docs/reference/api/docker_remote_api_v1.19.md +++ b/docs/reference/api/docker_remote_api_v1.19.md @@ -213,18 +213,6 @@ Json Parameters: - **Domainname** - A string value containing the domain name to use for the container. - **User** - A string value specifying the user inside the container. -- **Memory** - Memory limit in bytes. -- **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. - You must use this with `memory` and make the swap value larger than `memory`. -- **CpuShares** - An integer value containing the container's CPU Shares - (ie. the relative weight vs other containers). -- **CpuPeriod** - The length of a CPU period in microseconds. -- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. -- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead. -- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. -- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. -- **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. -- **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. - **AttachStdin** - Boolean value, attaches to `stdin`. - **AttachStdout** - Boolean value, attaches to `stdout`. - **AttachStderr** - Boolean value, attaches to `stderr`. @@ -254,6 +242,17 @@ Json Parameters: in the form of `container_name:alias`. - **LxcConf** - LXC specific configurations. These configurations only work when using the `lxc` execution driver. + - **Memory** - Memory limit in bytes. + - **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. + You must use this with `memory` and make the swap value larger than `memory`. + - **CpuShares** - An integer value containing the container's CPU Shares + (ie. the relative weight vs other containers). + - **CpuPeriod** - The length of a CPU period in microseconds. + - **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. + - **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. + - **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + - **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. + - **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. - **PortBindings** - A map of exposed container ports and the host port they should map to. A JSON object in the form `{ /: [{ "HostPort": "" }] }` diff --git a/docs/reference/api/docker_remote_api_v1.20.md b/docs/reference/api/docker_remote_api_v1.20.md index fbc56988ca..cb15ad51cf 100644 --- a/docs/reference/api/docker_remote_api_v1.20.md +++ b/docs/reference/api/docker_remote_api_v1.20.md @@ -215,19 +215,6 @@ Json Parameters: - **Domainname** - A string value containing the domain name to use for the container. - **User** - A string value specifying the user inside the container. -- **Memory** - Memory limit in bytes. -- **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. - You must use this with `memory` and make the swap value larger than `memory`. -- **CpuShares** - An integer value containing the container's CPU Shares - (ie. the relative weight vs other containers). -- **CpuPeriod** - The length of a CPU period in microseconds. -- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. -- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead. -- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. -- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. -- **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. -- **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. -- **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. - **AttachStdin** - Boolean value, attaches to `stdin`. - **AttachStdout** - Boolean value, attaches to `stdout`. - **AttachStderr** - Boolean value, attaches to `stderr`. @@ -257,6 +244,18 @@ Json Parameters: in the form of `container_name:alias`. - **LxcConf** - LXC specific configurations. These configurations only work when using the `lxc` execution driver. + - **Memory** - Memory limit in bytes. + - **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. + You must use this with `memory` and make the swap value larger than `memory`. + - **CpuShares** - An integer value containing the container's CPU Shares + (ie. the relative weight vs other containers). + - **CpuPeriod** - The length of a CPU period in microseconds. + - **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. + - **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. + - **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + - **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. + - **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + - **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. - **PortBindings** - A map of exposed container ports and the host port they should map to. A JSON object in the form `{ /: [{ "HostPort": "" }] }` diff --git a/docs/reference/api/docker_remote_api_v1.21.md b/docs/reference/api/docker_remote_api_v1.21.md index 7cdfd0f3f3..2279d2fc0b 100644 --- a/docs/reference/api/docker_remote_api_v1.21.md +++ b/docs/reference/api/docker_remote_api_v1.21.md @@ -224,21 +224,6 @@ Json Parameters: - **Domainname** - A string value containing the domain name to use for the container. - **User** - A string value specifying the user inside the container. -- **Memory** - Memory limit in bytes. -- **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. - You must use this with `memory` and make the swap value larger than `memory`. -- **MemoryReservation** - Memory soft limit in bytes. -- **KernelMemory** - Kernel memory limit in bytes. -- **CpuShares** - An integer value containing the container's CPU Shares - (ie. the relative weight vs other containers). -- **CpuPeriod** - The length of a CPU period in microseconds. -- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. -- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead. -- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. -- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. -- **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. -- **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. -- **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. - **AttachStdin** - Boolean value, attaches to `stdin`. - **AttachStdout** - Boolean value, attaches to `stdout`. - **AttachStderr** - Boolean value, attaches to `stderr`. @@ -271,6 +256,20 @@ Json Parameters: in the form of `container_name:alias`. - **LxcConf** - LXC specific configurations. These configurations only work when using the `lxc` execution driver. + - **Memory** - Memory limit in bytes. + - **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. + You must use this with `memory` and make the swap value larger than `memory`. + - **MemoryReservation** - Memory soft limit in bytes. + - **KernelMemory** - Kernel memory limit in bytes. + - **CpuShares** - An integer value containing the container's CPU Shares + (ie. the relative weight vs other containers). + - **CpuPeriod** - The length of a CPU period in microseconds. + - **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. + - **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. + - **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + - **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. + - **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + - **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. - **PortBindings** - A map of exposed container ports and the host port they should map to. A JSON object in the form `{ /: [{ "HostPort": "" }] }` diff --git a/docs/reference/api/docker_remote_api_v1.22.md b/docs/reference/api/docker_remote_api_v1.22.md index 5d3e1166bc..c0f7f21335 100644 --- a/docs/reference/api/docker_remote_api_v1.22.md +++ b/docs/reference/api/docker_remote_api_v1.22.md @@ -329,31 +329,6 @@ Json Parameters: - **Domainname** - A string value containing the domain name to use for the container. - **User** - A string value specifying the user inside the container. -- **Memory** - Memory limit in bytes. -- **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. - You must use this with `memory` and make the swap value larger than `memory`. -- **MemoryReservation** - Memory soft limit in bytes. -- **KernelMemory** - Kernel memory limit in bytes. -- **CpuShares** - An integer value containing the container's CPU Shares - (ie. the relative weight vs other containers). -- **CpuPeriod** - The length of a CPU period in microseconds. -- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. -- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead. -- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. -- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. -- **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. -- **BlkioWeightDevice** - Block IO weight (relative device weight) in the form of: `"BlkioWeightDevice": [{"Path": "device_path", "Weight": weight}]` -- **BlkioDeviceReadBps** - Limit read rate (bytes per second) from a device in the form of: `"BlkioDeviceReadBps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceReadBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` -- **BlkioDeviceWriteBps** - Limit write rate (bytes per second) to a device in the form of: `"BlkioDeviceWriteBps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceWriteBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` -- **BlkioDeviceReadIOps** - Limit read rate (IO per second) from a device in the form of: `"BlkioDeviceReadIOps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceReadIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` -- **BlkioDeviceWiiteIOps** - Limit write rate (IO per second) to a device in the form of: `"BlkioDeviceWriteIOps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceWriteIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` -- **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. -- **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. -- **OomScoreAdj** - An integer value containing the score given to the container in order to tune OOM killer preferences. - **AttachStdin** - Boolean value, attaches to `stdin`. - **AttachStdout** - Boolean value, attaches to `stdout`. - **AttachStderr** - Boolean value, attaches to `stderr`. @@ -383,6 +358,30 @@ Json Parameters: + `volume_name:container_path:ro` to make the bind mount read-only inside the container. - **Links** - A list of links for the container. Each link entry should be in the form of `container_name:alias`. + - **Memory** - Memory limit in bytes. + - **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. + You must use this with `memory` and make the swap value larger than `memory`. + - **MemoryReservation** - Memory soft limit in bytes. + - **KernelMemory** - Kernel memory limit in bytes. + - **CpuShares** - An integer value containing the container's CPU Shares + (ie. the relative weight vs other containers). + - **CpuPeriod** - The length of a CPU period in microseconds. + - **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. + - **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. + - **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + - **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. + - **BlkioWeightDevice** - Block IO weight (relative device weight) in the form of: `"BlkioWeightDevice": [{"Path": "device_path", "Weight": weight}]` + - **BlkioDeviceReadBps** - Limit read rate (bytes per second) from a device in the form of: `"BlkioDeviceReadBps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceReadBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` + - **BlkioDeviceWriteBps** - Limit write rate (bytes per second) to a device in the form of: `"BlkioDeviceWriteBps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceWriteBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` + - **BlkioDeviceReadIOps** - Limit read rate (IO per second) from a device in the form of: `"BlkioDeviceReadIOps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceReadIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` + - **BlkioDeviceWiiteIOps** - Limit write rate (IO per second) to a device in the form of: `"BlkioDeviceWriteIOps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceWriteIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` + - **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + - **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. + - **OomScoreAdj** - An integer value containing the score given to the container in order to tune OOM killer preferences. - **PortBindings** - A map of exposed container ports and the host port they should map to. A JSON object in the form `{ /: [{ "HostPort": "" }] }` diff --git a/docs/reference/api/docker_remote_api_v1.23.md b/docs/reference/api/docker_remote_api_v1.23.md index 30f556255c..dfeaa927f2 100644 --- a/docs/reference/api/docker_remote_api_v1.23.md +++ b/docs/reference/api/docker_remote_api_v1.23.md @@ -296,6 +296,7 @@ Create a container "MemorySwappiness": 60, "OomKillDisable": false, "OomScoreAdj": 500, + "PidsLimit": -1, "PortBindings": { "22/tcp": [{ "HostPort": "11022" }] }, "PublishAllPorts": false, "Privileged": false, @@ -348,32 +349,6 @@ Json Parameters: - **Domainname** - A string value containing the domain name to use for the container. - **User** - A string value specifying the user inside the container. -- **Memory** - Memory limit in bytes. -- **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. - You must use this with `memory` and make the swap value larger than `memory`. -- **MemoryReservation** - Memory soft limit in bytes. -- **KernelMemory** - Kernel memory limit in bytes. -- **CpuShares** - An integer value containing the container's CPU Shares - (ie. the relative weight vs other containers). -- **CpuPeriod** - The length of a CPU period in microseconds. -- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. -- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead. -- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. -- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. -- **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. -- **BlkioWeightDevice** - Block IO weight (relative device weight) in the form of: `"BlkioWeightDevice": [{"Path": "device_path", "Weight": weight}]` -- **BlkioDeviceReadBps** - Limit read rate (bytes per second) from a device in the form of: `"BlkioDeviceReadBps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceReadBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` -- **BlkioDeviceWriteBps** - Limit write rate (bytes per second) to a device in the form of: `"BlkioDeviceWriteBps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceWriteBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` -- **BlkioDeviceReadIOps** - Limit read rate (IO per second) from a device in the form of: `"BlkioDeviceReadIOps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceReadIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` -- **BlkioDeviceWiiteIOps** - Limit write rate (IO per second) to a device in the form of: `"BlkioDeviceWriteIOps": [{"Path": "device_path", "Rate": rate}]`, for example: - `"BlkioDeviceWriteIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` -- **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. -- **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. -- **OomScoreAdj** - An integer value containing the score given to the container in order to tune OOM killer preferences. -- **PidsLimit** - Tune a container's pids limit. Set -1 for unlimited. - **AttachStdin** - Boolean value, attaches to `stdin`. - **AttachStdout** - Boolean value, attaches to `stdout`. - **AttachStderr** - Boolean value, attaches to `stderr`. @@ -403,6 +378,31 @@ Json Parameters: + `volume_name:container_path:ro` to make the bind mount read-only inside the container. - **Links** - A list of links for the container. Each link entry should be in the form of `container_name:alias`. + - **Memory** - Memory limit in bytes. + - **MemorySwap** - Total memory limit (memory + swap); set `-1` to enable unlimited swap. + You must use this with `memory` and make the swap value larger than `memory`. + - **MemoryReservation** - Memory soft limit in bytes. + - **KernelMemory** - Kernel memory limit in bytes. + - **CpuShares** - An integer value containing the container's CPU Shares + (ie. the relative weight vs other containers). + - **CpuPeriod** - The length of a CPU period in microseconds. + - **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period. + - **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use. + - **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + - **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000. + - **BlkioWeightDevice** - Block IO weight (relative device weight) in the form of: `"BlkioWeightDevice": [{"Path": "device_path", "Weight": weight}]` + - **BlkioDeviceReadBps** - Limit read rate (bytes per second) from a device in the form of: `"BlkioDeviceReadBps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceReadBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` + - **BlkioDeviceWriteBps** - Limit write rate (bytes per second) to a device in the form of: `"BlkioDeviceWriteBps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceWriteBps": [{"Path": "/dev/sda", "Rate": "1024"}]"` + - **BlkioDeviceReadIOps** - Limit read rate (IO per second) from a device in the form of: `"BlkioDeviceReadIOps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceReadIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` + - **BlkioDeviceWiiteIOps** - Limit write rate (IO per second) to a device in the form of: `"BlkioDeviceWriteIOps": [{"Path": "device_path", "Rate": rate}]`, for example: + `"BlkioDeviceWriteIOps": [{"Path": "/dev/sda", "Rate": "1000"}]` + - **MemorySwappiness** - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + - **OomKillDisable** - Boolean value, whether to disable OOM Killer for the container or not. + - **OomScoreAdj** - An integer value containing the score given to the container in order to tune OOM killer preferences. + - **PidsLimit** - Tune a container's pids limit. Set -1 for unlimited. - **PortBindings** - A map of exposed container ports and the host port they should map to. A JSON object in the form `{ /: [{ "HostPort": "" }] }`