mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Synchronize API docs
This synchronizes changes between API versions, and: - appliese0a552504e
to older versions of the documentation - appliesa2a0a03e2b
to API version 1.25 - syncs some minor differences Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
94bc2b1bc0
commit
53b1dcb25c
8 changed files with 188 additions and 175 deletions
|
@ -921,43 +921,43 @@ Attach to the container `id`
|
||||||
- **404** – no such container
|
- **404** – no such container
|
||||||
- **500** – server error
|
- **500** – server error
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
|
|
||||||
When using the TTY setting is enabled in
|
When using the TTY setting is enabled in
|
||||||
[`POST /containers/create`
|
[`POST /containers/create`
|
||||||
](#create-a-container),
|
](#create-a-container),
|
||||||
the stream is the raw data from the process PTY and client's `stdin`.
|
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
|
When the TTY is disabled, then the stream is multiplexed to separate
|
||||||
`stdout` and `stderr`.
|
`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
|
The header contains the information which the stream writes (`stdout` or
|
||||||
`stderr`). It also contains the size of the associated frame encoded in the
|
`stderr`). It also contains the size of the associated frame encoded in the
|
||||||
last four bytes (`uint32`).
|
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
|
`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
||||||
the `uint32` size encoded as big endian.
|
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.
|
||||||
|
@ -1241,7 +1241,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**:
|
||||||
|
|
||||||
|
@ -1953,8 +1953,9 @@ interactive session with the `exec` command.
|
||||||
- **200** – no error
|
- **200** – no error
|
||||||
- **404** – no such exec instance
|
- **404** – no such exec instance
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
||||||
|
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
||||||
|
|
||||||
### Exec Resize
|
### Exec Resize
|
||||||
|
|
||||||
|
|
|
@ -958,43 +958,43 @@ Attach to the container `id`
|
||||||
- **404** – no such container
|
- **404** – no such container
|
||||||
- **500** – server error
|
- **500** – server error
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
|
|
||||||
When using the TTY setting is enabled in
|
When using the TTY setting is enabled in
|
||||||
[`POST /containers/create`
|
[`POST /containers/create`
|
||||||
](#create-a-container),
|
](#create-a-container),
|
||||||
the stream is the raw data from the process PTY and client's `stdin`.
|
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
|
When the TTY is disabled, then the stream is multiplexed to separate
|
||||||
`stdout` and `stderr`.
|
`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
|
The header contains the information which the stream writes (`stdout` or
|
||||||
`stderr`). It also contains the size of the associated frame encoded in the
|
`stderr`). It also contains the size of the associated frame encoded in the
|
||||||
last four bytes (`uint32`).
|
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
|
`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
||||||
the `uint32` size encoded as big endian.
|
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.
|
||||||
|
@ -1285,7 +1285,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**:
|
||||||
|
|
||||||
|
@ -2031,8 +2031,9 @@ interactive session with the `exec` command.
|
||||||
- **200** – no error
|
- **200** – no error
|
||||||
- **404** – no such exec instance
|
- **404** – no such exec instance
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
||||||
|
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
||||||
|
|
||||||
### Exec Resize
|
### Exec Resize
|
||||||
|
|
||||||
|
|
|
@ -967,43 +967,43 @@ Attach to the container `id`
|
||||||
- **404** – no such container
|
- **404** – no such container
|
||||||
- **500** – server error
|
- **500** – server error
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
|
|
||||||
When using the TTY setting is enabled in
|
When using the TTY setting is enabled in
|
||||||
[`POST /containers/create`
|
[`POST /containers/create`
|
||||||
](#create-a-container),
|
](#create-a-container),
|
||||||
the stream is the raw data from the process PTY and client's `stdin`.
|
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
|
When the TTY is disabled, then the stream is multiplexed to separate
|
||||||
`stdout` and `stderr`.
|
`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
|
The header contains the information which the stream writes (`stdout` or
|
||||||
`stderr`). It also contains the size of the associated frame encoded in the
|
`stderr`). It also contains the size of the associated frame encoded in the
|
||||||
last four bytes (`uint32`).
|
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
|
`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
||||||
the `uint32` size encoded as big endian.
|
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.
|
||||||
|
@ -1437,7 +1437,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**:
|
||||||
|
|
||||||
|
@ -2184,8 +2184,9 @@ interactive session with the `exec` command.
|
||||||
- **200** – no error
|
- **200** – no error
|
||||||
- **404** – no such exec instance
|
- **404** – no such exec instance
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
||||||
|
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
||||||
|
|
||||||
### Exec Resize
|
### Exec Resize
|
||||||
|
|
||||||
|
|
|
@ -1045,43 +1045,43 @@ Attach to the container `id`
|
||||||
- **404** – no such container
|
- **404** – no such container
|
||||||
- **500** – server error
|
- **500** – server error
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
|
|
||||||
When using the TTY setting is enabled in
|
When using the TTY setting is enabled in
|
||||||
[`POST /containers/create`
|
[`POST /containers/create`
|
||||||
](#create-a-container),
|
](#create-a-container),
|
||||||
the stream is the raw data from the process PTY and client's `stdin`.
|
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
|
When the TTY is disabled, then the stream is multiplexed to separate
|
||||||
`stdout` and `stderr`.
|
`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
|
The header contains the information which the stream writes (`stdout` or
|
||||||
`stderr`). It also contains the size of the associated frame encoded in the
|
`stderr`). It also contains the size of the associated frame encoded in the
|
||||||
last four bytes (`uint32`).
|
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
|
`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
||||||
the `uint32` size encoded as big endian.
|
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.
|
||||||
|
@ -1521,7 +1521,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**:
|
||||||
|
|
||||||
|
@ -2338,8 +2338,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**:
|
**Stream details**:
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
||||||
|
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
||||||
|
|
||||||
### Exec Resize
|
### Exec Resize
|
||||||
|
|
||||||
|
|
|
@ -1219,43 +1219,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
|
When using the TTY setting is enabled in
|
||||||
[`POST /containers/create`
|
[`POST /containers/create`
|
||||||
](#create-a-container),
|
](#create-a-container),
|
||||||
the stream is the raw data from the process PTY and client's `stdin`.
|
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
|
When the TTY is disabled, then the stream is multiplexed to separate
|
||||||
`stdout` and `stderr`.
|
`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
|
The header contains the information which the stream writes (`stdout` or
|
||||||
`stderr`). It also contains the size of the associated frame encoded in the
|
`stderr`). It also contains the size of the associated frame encoded in the
|
||||||
last four bytes (`uint32`).
|
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
|
`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
||||||
the `uint32` size encoded as big endian.
|
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.
|
||||||
|
@ -1699,7 +1699,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**:
|
||||||
|
|
||||||
|
@ -2731,8 +2731,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**:
|
**Stream details**:
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
||||||
|
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
||||||
|
|
||||||
### Exec Resize
|
### Exec Resize
|
||||||
|
|
||||||
|
|
|
@ -1252,43 +1252,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
|
When using the TTY setting is enabled in
|
||||||
[`POST /containers/create`
|
[`POST /containers/create`
|
||||||
](#create-a-container),
|
](#create-a-container),
|
||||||
the stream is the raw data from the process PTY and client's `stdin`.
|
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
|
When the TTY is disabled, then the stream is multiplexed to separate
|
||||||
`stdout` and `stderr`.
|
`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
|
The header contains the information which the stream writes (`stdout` or
|
||||||
`stderr`). It also contains the size of the associated frame encoded in the
|
`stderr`). It also contains the size of the associated frame encoded in the
|
||||||
last four bytes (`uint32`).
|
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
|
`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
||||||
the `uint32` size encoded as big endian.
|
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.
|
||||||
|
@ -1733,7 +1733,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**:
|
||||||
|
|
||||||
|
@ -2279,7 +2279,7 @@ Show the docker version information
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"Version": "1.10.0",
|
"Version": "1.11.0",
|
||||||
"Os": "linux",
|
"Os": "linux",
|
||||||
"KernelVersion": "3.19.0-23-generic",
|
"KernelVersion": "3.19.0-23-generic",
|
||||||
"GoVersion": "go1.4.2",
|
"GoVersion": "go1.4.2",
|
||||||
|
@ -2805,8 +2805,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**:
|
**Stream details**:
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
||||||
|
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
||||||
|
|
||||||
### Exec Resize
|
### Exec Resize
|
||||||
|
|
||||||
|
|
|
@ -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
|
When using the TTY setting is enabled in
|
||||||
[`POST /containers/create`
|
[`POST /containers/create`
|
||||||
](#create-a-container),
|
](#create-a-container),
|
||||||
the stream is the raw data from the process PTY and client's `stdin`.
|
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
|
When the TTY is disabled, then the stream is multiplexed to separate
|
||||||
`stdout` and `stderr`.
|
`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
|
The header contains the information which the stream writes (`stdout` or
|
||||||
`stderr`). It also contains the size of the associated frame encoded in the
|
`stderr`). It also contains the size of the associated frame encoded in the
|
||||||
last four bytes (`uint32`).
|
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
|
`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of
|
||||||
the `uint32` size encoded as big endian.
|
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**:
|
**Stream details**:
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
|
||||||
|
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`.
|
||||||
|
|
||||||
|
|
|
@ -328,6 +328,7 @@ Create a container
|
||||||
"AutoRemove": true,
|
"AutoRemove": true,
|
||||||
"NetworkMode": "bridge",
|
"NetworkMode": "bridge",
|
||||||
"Devices": [],
|
"Devices": [],
|
||||||
|
"Sysctls": { "net.ipv4.ip_forward": "1" },
|
||||||
"Ulimits": [{}],
|
"Ulimits": [{}],
|
||||||
"LogConfig": { "Type": "json-file", "Config": {} },
|
"LogConfig": { "Type": "json-file", "Config": {} },
|
||||||
"SecurityOpt": [],
|
"SecurityOpt": [],
|
||||||
|
@ -1323,7 +1324,7 @@ 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:
|
||||||
|
|
||||||
|
@ -2852,6 +2853,7 @@ interactive session with the `exec` command.
|
||||||
- **409** - container is paused
|
- **409** - container is paused
|
||||||
|
|
||||||
**Stream details**:
|
**Stream details**:
|
||||||
|
|
||||||
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
Similar to the stream behavior of `POST /containers/(id or name)/attach` API
|
||||||
|
|
||||||
### Exec Resize
|
### Exec Resize
|
||||||
|
@ -4200,7 +4202,7 @@ Inspect swarm
|
||||||
|
|
||||||
`POST /swarm/init`
|
`POST /swarm/init`
|
||||||
|
|
||||||
Initialize a new swarm
|
Initialize a new swarm. The body of the HTTP response includes the node ID.
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
|
@ -4222,8 +4224,12 @@ Initialize a new swarm
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Length: 0
|
Content-Length: 28
|
||||||
Content-Type: text/plain; charset=utf-8
|
Content-Type: application/json
|
||||||
|
Date: Thu, 01 Sep 2016 21:49:13 GMT
|
||||||
|
Server: Docker/1.12.0 (linux)
|
||||||
|
|
||||||
|
"7v2t30z9blmxuhnyo6s4cpenp"
|
||||||
|
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue