|
@@ -1283,43 +1283,43 @@ Attach to the container `id`
|
|
- **409** - container is paused
|
|
- **409** - container is paused
|
|
- **500** – server error
|
|
- **500** – server error
|
|
|
|
|
|
- **Stream details**:
|
|
|
|
|
|
+**Stream details**:
|
|
|
|
|
|
- When using the TTY setting is enabled in
|
|
|
|
- [`POST /containers/create`
|
|
|
|
- ](#create-a-container),
|
|
|
|
- the stream is the raw data from the process PTY and client's `stdin`.
|
|
|
|
- When the TTY is disabled, then the stream is multiplexed to separate
|
|
|
|
- `stdout` and `stderr`.
|
|
|
|
|
|
+When using the TTY setting is enabled in
|
|
|
|
+[`POST /containers/create`
|
|
|
|
+](#create-a-container),
|
|
|
|
+the stream is the raw data from the process PTY and client's `stdin`.
|
|
|
|
+When the TTY is disabled, then the stream is multiplexed to separate
|
|
|
|
+`stdout` and `stderr`.
|
|
|
|
|
|
- The format is a **Header** and a **Payload** (frame).
|
|
|
|
|
|
+The format is a **Header** and a **Payload** (frame).
|
|
|
|
|
|
- **HEADER**
|
|
|
|
|
|
+**HEADER**
|
|
|
|
|
|
- The header contains the information which the stream writes (`stdout` or
|
|
|
|
- `stderr`). It also contains the size of the associated frame encoded in the
|
|
|
|
- last four bytes (`uint32`).
|
|
|
|
|
|
+The header contains the information which the stream writes (`stdout` or
|
|
|
|
+`stderr`). It also contains the size of the associated frame encoded in the
|
|
|
|
+last four bytes (`uint32`).
|
|
|
|
|
|
- It is encoded on the first eight bytes like this:
|
|
|
|
|
|
+It is encoded on the first eight bytes like this:
|
|
|
|
|
|
- header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
|
|
|
|
|
|
+ header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
|
|
|
|
|
|
- `STREAM_TYPE` can be:
|
|
|
|
|
|
+`STREAM_TYPE` can be:
|
|
|
|
|
|
- 0: `stdin` (is written on `stdout`)
|
|
- 0: `stdin` (is written on `stdout`)
|
|
- 1: `stdout`
|
|
- 1: `stdout`
|
|
- 2: `stderr`
|
|
- 2: `stderr`
|
|
|
|
|
|
- `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
|
|
|
- the `uint32` size encoded as big endian.
|
|
|
|
|
|
+`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
|
|
|
+the `uint32` size encoded as big endian.
|
|
|
|
|
|
- **PAYLOAD**
|
|
|
|
|
|
+**PAYLOAD**
|
|
|
|
|
|
- The payload is the raw stream.
|
|
|
|
|
|
+The payload is the raw stream.
|
|
|
|
|
|
- **IMPLEMENTATION**
|
|
|
|
|
|
+**IMPLEMENTATION**
|
|
|
|
|
|
- The simplest way to implement the Attach protocol is the following:
|
|
|
|
|
|
+The simplest way to implement the Attach protocol is the following:
|
|
|
|
|
|
1. Read eight bytes.
|
|
1. Read eight bytes.
|
|
2. Choose `stdout` or `stderr` depending on the first byte.
|
|
2. Choose `stdout` or `stderr` depending on the first byte.
|
|
@@ -1736,7 +1736,7 @@ Create an image either by pulling it from the registry or by importing it
|
|
|
|
|
|
**Example request**:
|
|
**Example request**:
|
|
|
|
|
|
- POST /images/create?fromImage=ubuntu HTTP/1.1
|
|
|
|
|
|
+ POST /images/create?fromImage=busybox&tag=latest HTTP/1.1
|
|
|
|
|
|
**Example response**:
|
|
**Example response**:
|
|
|
|
|
|
@@ -2821,8 +2821,9 @@ interactive session with the `exec` command.
|
|
- **404** – no such exec instance
|
|
- **404** – no such exec instance
|
|
- **409** - container is paused
|
|
- **409** - container is paused
|
|
|
|
|
|
- **Stream details**:
|
|
|
|
- Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
|
|
|
|
+**Stream details**:
|
|
|
|
+
|
|
|
|
+Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
|
|
|
|
### Exec Resize
|
|
### Exec Resize
|
|
|
|
|
|
@@ -4010,7 +4011,7 @@ Return low-level information on the node `id`
|
|
### Remove a node
|
|
### Remove a node
|
|
|
|
|
|
|
|
|
|
-`DELETE /nodes/<id>`
|
|
|
|
|
|
+`DELETE /nodes/(id)`
|
|
|
|
|
|
Remove a node [`id`] from the swarm.
|
|
Remove a node [`id`] from the swarm.
|
|
|
|
|
|
@@ -4038,7 +4039,7 @@ Remove a node [`id`] from the swarm.
|
|
### Update a node
|
|
### Update a node
|
|
|
|
|
|
|
|
|
|
-`POST /nodes/<id>/update`
|
|
|
|
|
|
+`POST /nodes/(id)/update`
|
|
|
|
|
|
Update the node `id`.
|
|
Update the node `id`.
|
|
|
|
|