Skip to content

Commit

Permalink
Add missing API docs for HostConfig.PidMode
Browse files Browse the repository at this point in the history
The `--pid` flag was added in Docker 1.5.0, but the
API changes were not documented. In Docker 1.12.0,
`--pid=container:<name|id>` was added as an additional
option, but also undocumented.

This adds the missing API documentation for this
option.

Also see commits
47e3da8 (for 1.5.0), and
ebeb5a0 (for 1.12.0).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Jul 11, 2016
1 parent 6dc2dd4 commit 2c9b5ad
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/reference/api/docker_remote_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ This section lists each version from latest to oldest. Each listing includes a
no longer expects a "Container" field to be present. This property was not used
and is no longer sent by the docker client.
* `POST /containers/create/` now validates the hostname (should be a valid RFC 1123 hostname).
* `POST /containers/create/` `HostConfig.PidMode` field now accepts `container:<name|id>`,
to have the container join the PID namespace of an existing container.

### v1.23 API changes

Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.18.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Create a container
"MemorySwap": 0,
"CpuShares": 512,
"CpusetCpus": "0,1",
"PidMode": "",
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
"Privileged": false,
Expand Down Expand Up @@ -242,6 +243,9 @@ Json Parameters:
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **PortBindings** - A map of exposed container ports and the host port they
should map to. It should be specified in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Expand Down Expand Up @@ -373,6 +377,7 @@ Return low-level information on the container `id`
"Memory": 0,
"MemorySwap": 0,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.19.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ Create a container
"CpusetMems": "0,1",
"BlkioWeight": 300,
"OomKillDisable": false,
"PidMode": "",
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
"Privileged": false,
Expand Down Expand Up @@ -253,6 +254,9 @@ Json Parameters:
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **PortBindings** - A map of exposed container ports and the host port they
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Expand Down Expand Up @@ -388,6 +392,7 @@ Return low-level information on the container `id`
"MemorySwap": 0,
"OomKillDisable": false,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.20.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Create a container
"BlkioWeight": 300,
"MemorySwappiness": 60,
"OomKillDisable": false,
"PidMode": "",
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
"Privileged": false,
Expand Down Expand Up @@ -256,6 +257,9 @@ Json Parameters:
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **PortBindings** - A map of exposed container ports and the host port they
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Expand Down Expand Up @@ -391,6 +395,7 @@ Return low-level information on the container `id`
"MemorySwap": 0,
"OomKillDisable": false,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ Create a container
"BlkioWeight": 300,
"MemorySwappiness": 60,
"OomKillDisable": false,
"PidMode": "",
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
"Privileged": false,
Expand Down Expand Up @@ -271,6 +272,9 @@ Json Parameters:
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **PortBindings** - A map of exposed container ports and the host port they
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Expand Down Expand Up @@ -414,6 +418,7 @@ Return low-level information on the container `id`
"KernelMemory": 0,
"OomKillDisable": false,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.22.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ Create a container
"MemorySwappiness": 60,
"OomKillDisable": false,
"OomScoreAdj": 500,
"PidMode": "",
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
"Privileged": false,
Expand Down Expand Up @@ -382,6 +383,9 @@ Json Parameters:
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **PortBindings** - A map of exposed container ports and the host port they
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Expand Down Expand Up @@ -533,6 +537,7 @@ Return low-level information on the container `id`
"OomKillDisable": false,
"OomScoreAdj": 500,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.23.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ Create a container
"MemorySwappiness": 60,
"OomKillDisable": false,
"OomScoreAdj": 500,
"PidMode": "",
"PidsLimit": -1,
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
Expand Down Expand Up @@ -402,6 +403,9 @@ Json Parameters:
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **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
Expand Down Expand Up @@ -556,6 +560,7 @@ Return low-level information on the container `id`
"OomKillDisable": false,
"OomScoreAdj": 500,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.24.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ Create a container
"MemorySwappiness": 60,
"OomKillDisable": false,
"OomScoreAdj": 500,
"PidMode": "",
"PidsLimit": -1,
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
Expand Down Expand Up @@ -421,6 +422,9 @@ Create a container
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **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
Expand Down Expand Up @@ -582,6 +586,7 @@ Return low-level information on the container `id`
"OomKillDisable": false,
"OomScoreAdj": 500,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/api/docker_remote_api_v1.25.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ Create a container
"MemorySwappiness": 60,
"OomKillDisable": false,
"OomScoreAdj": 500,
"PidMode": "",
"PidsLimit": -1,
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"PublishAllPorts": false,
Expand Down Expand Up @@ -422,6 +423,9 @@ Create a container
- **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.
- **PidMode** - Set the PID (Process) Namespace mode for the container;
`"container:<name|id>"`: joins another container's PID namespace
`"host"`: use the host's PID namespace inside the container
- **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
Expand Down Expand Up @@ -583,6 +587,7 @@ Return low-level information on the container `id`
"OomKillDisable": false,
"OomScoreAdj": 500,
"NetworkMode": "bridge",
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"ReadonlyRootfs": false,
Expand Down

0 comments on commit 2c9b5ad

Please sign in to comment.