Skip to content

Commit 286fe69

Browse files
committed
docs: update remote API responses and minor fixes
Add back the "old" networksettings fields that were removed, but added back to maintain backward compatibility, in moby#17538 Update network endpoint responses, with updated response introduced in; moby#17536 Added changes to v1.22 that were applied to the v1.21 / v1.20 docs after the API bump(s); moby#17085 moby#17127 moby#13707 Also fixed some mixed tab/spaces indentation and Markdown formatting issues (causing code-blocks to be rendered incorrectly) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 05a4cb2 commit 286fe69

4 files changed

Lines changed: 443 additions & 314 deletions

File tree

docs/reference/api/docker_remote_api.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ list of DNS options to be used in the container.
116116
* `GET /containers/json` will return `ImageID` of the image used by container.
117117
* `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused.
118118
* `GET /containers/(name)/json` now accepts a `size` parameter. Setting this parameter to '1' returns container size information in the `SizeRw` and `SizeRootFs` fields.
119+
* `GET /containers/(name)/json` now returns a `NetworkSettings.Networks` field,
120+
detailing network settings per network. This field deprecates the
121+
`NetworkSettings.Gateway`, `NetworkSettings.IPAddress`,
122+
`NetworkSettings.IPPrefixLen`, and `NetworkSettings.MacAddress` fields, which
123+
are still returned for backward-compatibility, but will be removed in a future version.
124+
* `GET /exec/(id)/json` now returns a `NetworkSettings.Networks` field,
125+
detailing networksettings per network. This field deprecates the
126+
`NetworkSettings.Gateway`, `NetworkSettings.IPAddress`,
127+
`NetworkSettings.IPPrefixLen`, and `NetworkSettings.MacAddress` fields, which
128+
are still returned for backward-compatibility, but will be removed in a future version.
119129

120130
### v1.20 API changes
121131

docs/reference/api/docker_remote_api_v1.20.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Json Parameters:
217217
for the container.
218218
- **User** - A string value specifying the user inside the container.
219219
- **Memory** - Memory limit in bytes.
220-
- **MemorySwap**- Total memory limit (memory + swap); set `-1` to disable swap
220+
- **MemorySwap** - Total memory limit (memory + swap); set `-1` to disable swap
221221
You must use this with `memory` and make the swap value larger than `memory`.
222222
- **CpuShares** - An integer value containing the container's CPU Shares
223223
(ie. the relative weight vs other containers).
@@ -2141,12 +2141,12 @@ Status Codes:
21412141

21422142
`POST /exec/(id)/resize`
21432143

2144-
Resizes the `tty` session used by the `exec` command `id`.
2144+
Resizes the `tty` session used by the `exec` command `id`. The unit is number of characters.
21452145
This API is valid only if `tty` was specified as part of creating and starting the `exec` command.
21462146

21472147
**Example request**:
21482148

2149-
POST /exec/e90e34656806/resize HTTP/1.1
2149+
POST /exec/e90e34656806/resize?h=40&w=80 HTTP/1.1
21502150
Content-Type: text/plain
21512151

21522152
**Example response**:
@@ -2257,7 +2257,7 @@ Return low-level information about the `exec` command `id`.
22572257
"ProcessLabel" : "",
22582258
"AppArmorProfile" : "",
22592259
"RestartCount" : 0,
2260-
"Mounts" : [],
2260+
"Mounts" : []
22612261
}
22622262
}
22632263

0 commit comments

Comments
 (0)