Add missing API docs for "privileged" and "user" exec

The "user" feature was added in docker 1.7.0, and
"privileged" feature was added in docker 1.9.0
only contained CLI docs.

This adds the missing API docs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c53efdf4c1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2016-09-22 23:26:49 +02:00
parent 9363b42e59
commit fc884da817
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
8 changed files with 98 additions and 83 deletions

View file

@ -1887,15 +1887,13 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"Tty": true
}
**Example response**:

View file

@ -1965,15 +1965,14 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"Tty": true,
"User": "123:456"
}
**Example response**:
@ -1992,7 +1991,9 @@ Sets up an exec instance in a running container `id`
- **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
- **Tty** - Boolean value to allocate a pseudo-TTY.
- **Cmd** - Command to run specified as a string or an array of strings.
- **User** - A string value specifying the user, and optionally, group to run
the exec process inside the container. Format is one of: `"user"`,
`"user:group"`, `"uid"`, or `"uid:gid"`.
**Status codes**:

View file

@ -2118,15 +2118,14 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"Tty": true,
"User": "123:456"
}
**Example response**:
@ -2145,7 +2144,9 @@ Sets up an exec instance in a running container `id`
- **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
- **Tty** - Boolean value to allocate a pseudo-TTY.
- **Cmd** - Command to run specified as a string or an array of strings.
- **User** - A string value specifying the user, and optionally, group to run
the exec process inside the container. Format is one of: `"user"`,
`"user:group"`, `"uid"`, or `"uid:gid"`.
**Status codes**:

View file

@ -2272,15 +2272,15 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"Privileged": true,
"Tty": true,
"User": "123:456"
}
**Example response**:
@ -2299,7 +2299,10 @@ Sets up an exec instance in a running container `id`
- **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
- **Tty** - Boolean value to allocate a pseudo-TTY.
- **Cmd** - Command to run specified as a string or an array of strings.
- **Privileged** - Boolean value, runs the exec process with extended privileges.
- **User** - A string value specifying the user, and optionally, group to run
the exec process inside the container. Format is one of: `"user"`,
`"user:group"`, `"uid"`, or `"uid:gid"`.
**Status codes**:

View file

@ -2662,16 +2662,16 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"DetachKeys": "ctrl-p,ctrl-q",
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"DetachKeys": "ctrl-p,ctrl-q",
"Privileged": true,
"Tty": true,
"User": "123:456"
}
**Example response**:
@ -2693,7 +2693,10 @@ Sets up an exec instance in a running container `id`
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
- **Tty** - Boolean value to allocate a pseudo-TTY.
- **Cmd** - Command to run specified as a string or an array of strings.
- **Privileged** - Boolean value, runs the exec process with extended privileges.
- **User** - A string value specifying the user, and optionally, group to run
the exec process inside the container. Format is one of: `"user"`,
`"user:group"`, `"uid"`, or `"uid:gid"`.
**Status codes**:

View file

@ -2736,16 +2736,16 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"DetachKeys": "ctrl-p,ctrl-q",
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"DetachKeys": "ctrl-p,ctrl-q",
"Privileged": true,
"Tty": true,
"User": "123:456"
}
**Example response**:
@ -2767,7 +2767,10 @@ Sets up an exec instance in a running container `id`
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
- **Tty** - Boolean value to allocate a pseudo-TTY.
- **Cmd** - Command to run specified as a string or an array of strings.
- **Privileged** - Boolean value, runs the exec process with extended privileges.
- **User** - A string value specifying the user, and optionally, group to run
the exec process inside the container. Format is one of: `"user"`,
`"user:group"`, `"uid"`, or `"uid:gid"`.
**Status codes**:

View file

@ -2750,16 +2750,16 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"DetachKeys": "ctrl-p,ctrl-q",
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"DetachKeys": "ctrl-p,ctrl-q",
"Privileged": true,
"Tty": true,
"User": "123:456"
}
**Example response**:
@ -2781,7 +2781,10 @@ Sets up an exec instance in a running container `id`
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
- **Tty** - Boolean value to allocate a pseudo-TTY.
- **Cmd** - Command to run specified as a string or an array of strings.
- **Privileged** - Boolean value, runs the exec process with extended privileges.
- **User** - A string value specifying the user, and optionally, group to run
the exec process inside the container. Format is one of: `"user"`,
`"user:group"`, `"uid"`, or `"uid:gid"`.
**Status codes**:

View file

@ -2766,16 +2766,16 @@ Sets up an exec instance in a running container `id`
POST /containers/e90e34656806/exec HTTP/1.1
Content-Type: application/json
{
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"DetachKeys": "ctrl-p,ctrl-q",
"Tty": false,
"Cmd": [
"date"
]
}
{
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"Cmd": ["sh"],
"DetachKeys": "ctrl-p,ctrl-q",
"Privileged": true,
"Tty": true,
"User": "123:456"
}
**Example response**:
@ -2797,7 +2797,10 @@ Sets up an exec instance in a running container `id`
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
- **Tty** - Boolean value to allocate a pseudo-TTY.
- **Cmd** - Command to run specified as a string or an array of strings.
- **Privileged** - Boolean value, runs the exec process with extended privileges.
- **User** - A string value specifying the user, and optionally, group to run
the exec process inside the container. Format is one of: `"user"`,
`"user:group"`, `"uid"`, or `"uid:gid"`.
**Status codes**: