|
@@ -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**:
|
|
|
|