Skip to content

Commit fc884da

Browse files
committed
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 <[email protected]> (cherry picked from commit c53efdf) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 9363b42 commit fc884da

8 files changed

Lines changed: 98 additions & 83 deletions

docs/reference/api/docker_remote_api_v1.18.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,15 +1887,13 @@ Sets up an exec instance in a running container `id`
18871887
POST /containers/e90e34656806/exec HTTP/1.1
18881888
Content-Type: application/json
18891889

1890-
{
1891-
"AttachStdin": false,
1892-
"AttachStdout": true,
1893-
"AttachStderr": true,
1894-
"Tty": false,
1895-
"Cmd": [
1896-
"date"
1897-
]
1898-
}
1890+
{
1891+
"AttachStdin": true,
1892+
"AttachStdout": true,
1893+
"AttachStderr": true,
1894+
"Cmd": ["sh"],
1895+
"Tty": true
1896+
}
18991897

19001898
**Example response**:
19011899

docs/reference/api/docker_remote_api_v1.19.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,15 +1965,14 @@ Sets up an exec instance in a running container `id`
19651965
POST /containers/e90e34656806/exec HTTP/1.1
19661966
Content-Type: application/json
19671967

1968-
{
1969-
"AttachStdin": false,
1970-
"AttachStdout": true,
1971-
"AttachStderr": true,
1972-
"Tty": false,
1973-
"Cmd": [
1974-
"date"
1975-
]
1976-
}
1968+
{
1969+
"AttachStdin": true,
1970+
"AttachStdout": true,
1971+
"AttachStderr": true,
1972+
"Cmd": ["sh"],
1973+
"Tty": true,
1974+
"User": "123:456"
1975+
}
19771976

19781977
**Example response**:
19791978

@@ -1992,7 +1991,9 @@ Sets up an exec instance in a running container `id`
19921991
- **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
19931992
- **Tty** - Boolean value to allocate a pseudo-TTY.
19941993
- **Cmd** - Command to run specified as a string or an array of strings.
1995-
1994+
- **User** - A string value specifying the user, and optionally, group to run
1995+
the exec process inside the container. Format is one of: `"user"`,
1996+
`"user:group"`, `"uid"`, or `"uid:gid"`.
19961997

19971998
**Status codes**:
19981999

docs/reference/api/docker_remote_api_v1.20.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,15 +2118,14 @@ Sets up an exec instance in a running container `id`
21182118
POST /containers/e90e34656806/exec HTTP/1.1
21192119
Content-Type: application/json
21202120

2121-
{
2122-
"AttachStdin": false,
2123-
"AttachStdout": true,
2124-
"AttachStderr": true,
2125-
"Tty": false,
2126-
"Cmd": [
2127-
"date"
2128-
]
2129-
}
2121+
{
2122+
"AttachStdin": true,
2123+
"AttachStdout": true,
2124+
"AttachStderr": true,
2125+
"Cmd": ["sh"],
2126+
"Tty": true,
2127+
"User": "123:456"
2128+
}
21302129

21312130
**Example response**:
21322131

@@ -2145,7 +2144,9 @@ Sets up an exec instance in a running container `id`
21452144
- **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
21462145
- **Tty** - Boolean value to allocate a pseudo-TTY.
21472146
- **Cmd** - Command to run specified as a string or an array of strings.
2148-
2147+
- **User** - A string value specifying the user, and optionally, group to run
2148+
the exec process inside the container. Format is one of: `"user"`,
2149+
`"user:group"`, `"uid"`, or `"uid:gid"`.
21492150

21502151
**Status codes**:
21512152

docs/reference/api/docker_remote_api_v1.21.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,15 +2272,15 @@ Sets up an exec instance in a running container `id`
22722272
POST /containers/e90e34656806/exec HTTP/1.1
22732273
Content-Type: application/json
22742274

2275-
{
2276-
"AttachStdin": false,
2277-
"AttachStdout": true,
2278-
"AttachStderr": true,
2279-
"Tty": false,
2280-
"Cmd": [
2281-
"date"
2282-
]
2283-
}
2275+
{
2276+
"AttachStdin": true,
2277+
"AttachStdout": true,
2278+
"AttachStderr": true,
2279+
"Cmd": ["sh"],
2280+
"Privileged": true,
2281+
"Tty": true,
2282+
"User": "123:456"
2283+
}
22842284

22852285
**Example response**:
22862286

@@ -2299,7 +2299,10 @@ Sets up an exec instance in a running container `id`
22992299
- **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
23002300
- **Tty** - Boolean value to allocate a pseudo-TTY.
23012301
- **Cmd** - Command to run specified as a string or an array of strings.
2302-
2302+
- **Privileged** - Boolean value, runs the exec process with extended privileges.
2303+
- **User** - A string value specifying the user, and optionally, group to run
2304+
the exec process inside the container. Format is one of: `"user"`,
2305+
`"user:group"`, `"uid"`, or `"uid:gid"`.
23032306

23042307
**Status codes**:
23052308

docs/reference/api/docker_remote_api_v1.22.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,16 +2662,16 @@ Sets up an exec instance in a running container `id`
26622662
POST /containers/e90e34656806/exec HTTP/1.1
26632663
Content-Type: application/json
26642664
2665-
{
2666-
"AttachStdin": false,
2667-
"AttachStdout": true,
2668-
"AttachStderr": true,
2669-
"DetachKeys": "ctrl-p,ctrl-q",
2670-
"Tty": false,
2671-
"Cmd": [
2672-
"date"
2673-
]
2674-
}
2665+
{
2666+
"AttachStdin": true,
2667+
"AttachStdout": true,
2668+
"AttachStderr": true,
2669+
"Cmd": ["sh"],
2670+
"DetachKeys": "ctrl-p,ctrl-q",
2671+
"Privileged": true,
2672+
"Tty": true,
2673+
"User": "123:456"
2674+
}
26752675
26762676
**Example response**:
26772677
@@ -2693,7 +2693,10 @@ Sets up an exec instance in a running container `id`
26932693
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
26942694
- **Tty** - Boolean value to allocate a pseudo-TTY.
26952695
- **Cmd** - Command to run specified as a string or an array of strings.
2696-
2696+
- **Privileged** - Boolean value, runs the exec process with extended privileges.
2697+
- **User** - A string value specifying the user, and optionally, group to run
2698+
the exec process inside the container. Format is one of: `"user"`,
2699+
`"user:group"`, `"uid"`, or `"uid:gid"`.
26972700
26982701
**Status codes**:
26992702

docs/reference/api/docker_remote_api_v1.23.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,16 +2736,16 @@ Sets up an exec instance in a running container `id`
27362736
POST /containers/e90e34656806/exec HTTP/1.1
27372737
Content-Type: application/json
27382738
2739-
{
2740-
"AttachStdin": false,
2741-
"AttachStdout": true,
2742-
"AttachStderr": true,
2743-
"DetachKeys": "ctrl-p,ctrl-q",
2744-
"Tty": false,
2745-
"Cmd": [
2746-
"date"
2747-
]
2748-
}
2739+
{
2740+
"AttachStdin": true,
2741+
"AttachStdout": true,
2742+
"AttachStderr": true,
2743+
"Cmd": ["sh"],
2744+
"DetachKeys": "ctrl-p,ctrl-q",
2745+
"Privileged": true,
2746+
"Tty": true,
2747+
"User": "123:456"
2748+
}
27492749
27502750
**Example response**:
27512751
@@ -2767,7 +2767,10 @@ Sets up an exec instance in a running container `id`
27672767
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
27682768
- **Tty** - Boolean value to allocate a pseudo-TTY.
27692769
- **Cmd** - Command to run specified as a string or an array of strings.
2770-
2770+
- **Privileged** - Boolean value, runs the exec process with extended privileges.
2771+
- **User** - A string value specifying the user, and optionally, group to run
2772+
the exec process inside the container. Format is one of: `"user"`,
2773+
`"user:group"`, `"uid"`, or `"uid:gid"`.
27712774
27722775
**Status codes**:
27732776

docs/reference/api/docker_remote_api_v1.24.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,16 +2750,16 @@ Sets up an exec instance in a running container `id`
27502750
POST /containers/e90e34656806/exec HTTP/1.1
27512751
Content-Type: application/json
27522752
2753-
{
2754-
"AttachStdin": false,
2755-
"AttachStdout": true,
2756-
"AttachStderr": true,
2757-
"DetachKeys": "ctrl-p,ctrl-q",
2758-
"Tty": false,
2759-
"Cmd": [
2760-
"date"
2761-
]
2762-
}
2753+
{
2754+
"AttachStdin": true,
2755+
"AttachStdout": true,
2756+
"AttachStderr": true,
2757+
"Cmd": ["sh"],
2758+
"DetachKeys": "ctrl-p,ctrl-q",
2759+
"Privileged": true,
2760+
"Tty": true,
2761+
"User": "123:456"
2762+
}
27632763
27642764
**Example response**:
27652765
@@ -2781,7 +2781,10 @@ Sets up an exec instance in a running container `id`
27812781
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
27822782
- **Tty** - Boolean value to allocate a pseudo-TTY.
27832783
- **Cmd** - Command to run specified as a string or an array of strings.
2784-
2784+
- **Privileged** - Boolean value, runs the exec process with extended privileges.
2785+
- **User** - A string value specifying the user, and optionally, group to run
2786+
the exec process inside the container. Format is one of: `"user"`,
2787+
`"user:group"`, `"uid"`, or `"uid:gid"`.
27852788
27862789
**Status codes**:
27872790

docs/reference/api/docker_remote_api_v1.25.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,16 +2766,16 @@ Sets up an exec instance in a running container `id`
27662766
POST /containers/e90e34656806/exec HTTP/1.1
27672767
Content-Type: application/json
27682768
2769-
{
2770-
"AttachStdin": false,
2771-
"AttachStdout": true,
2772-
"AttachStderr": true,
2773-
"DetachKeys": "ctrl-p,ctrl-q",
2774-
"Tty": false,
2775-
"Cmd": [
2776-
"date"
2777-
]
2778-
}
2769+
{
2770+
"AttachStdin": true,
2771+
"AttachStdout": true,
2772+
"AttachStderr": true,
2773+
"Cmd": ["sh"],
2774+
"DetachKeys": "ctrl-p,ctrl-q",
2775+
"Privileged": true,
2776+
"Tty": true,
2777+
"User": "123:456"
2778+
}
27792779
27802780
**Example response**:
27812781
@@ -2797,7 +2797,10 @@ Sets up an exec instance in a running container `id`
27972797
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
27982798
- **Tty** - Boolean value to allocate a pseudo-TTY.
27992799
- **Cmd** - Command to run specified as a string or an array of strings.
2800-
2800+
- **Privileged** - Boolean value, runs the exec process with extended privileges.
2801+
- **User** - A string value specifying the user, and optionally, group to run
2802+
the exec process inside the container. Format is one of: `"user"`,
2803+
`"user:group"`, `"uid"`, or `"uid:gid"`.
28012804
28022805
**Status codes**:
28032806

0 commit comments

Comments
 (0)