Cleanup exec API docs and available params
| ... | ... |
@@ -122,8 +122,6 @@ func (d *Daemon) ContainerExecCreate(job *engine.Job) engine.Status {
|
| 122 | 122 |
entrypoint, args := d.getEntrypointAndArgs(nil, config.Cmd) |
| 123 | 123 |
|
| 124 | 124 |
processConfig := execdriver.ProcessConfig{
|
| 125 |
- Privileged: config.Privileged, |
|
| 126 |
- User: config.User, |
|
| 127 | 125 |
Tty: config.Tty, |
| 128 | 126 |
Entrypoint: entrypoint, |
| 129 | 127 |
Arguments: args, |
| ... | ... |
@@ -1561,7 +1561,6 @@ Sets up an exec instance in a running container `id` |
| 1561 | 1561 |
"Cmd":[ |
| 1562 | 1562 |
"date" |
| 1563 | 1563 |
], |
| 1564 |
- "Container":"e90e34656806", |
|
| 1565 | 1564 |
} |
| 1566 | 1565 |
|
| 1567 | 1566 |
**Example response**: |
| ... | ... |
@@ -1575,7 +1574,12 @@ Sets up an exec instance in a running container `id` |
| 1575 | 1575 |
|
| 1576 | 1576 |
Json Parameters: |
| 1577 | 1577 |
|
| 1578 |
-- **execConfig** ? exec configuration. |
|
| 1578 |
+- **AttachStdin** - Boolean value, attaches to stdin of the exec command. |
|
| 1579 |
+- **AttachStdout** - Boolean value, attaches to stdout of the exec command. |
|
| 1580 |
+- **AttachStderr** - Boolean value, attaches to stderr of the exec command. |
|
| 1581 |
+- **Tty** - Boolean value to allocate a pseudo-TTY |
|
| 1582 |
+- **Cmd** - Command to run specified as a string or an array of strings. |
|
| 1583 |
+ |
|
| 1579 | 1584 |
|
| 1580 | 1585 |
Status Codes: |
| 1581 | 1586 |
|
| ... | ... |
@@ -1586,8 +1590,9 @@ Status Codes: |
| 1586 | 1586 |
|
| 1587 | 1587 |
`POST /exec/(id)/start` |
| 1588 | 1588 |
|
| 1589 |
-Starts a previously set up exec instance `id`. If `detach` is true, this API returns after |
|
| 1590 |
-starting the `exec` command. Otherwise, this API sets up an interactive session with the `exec` command. |
|
| 1589 |
+Starts a previously set up exec instance `id`. If `detach` is true, this API |
|
| 1590 |
+returns after starting the `exec` command. Otherwise, this API sets up an |
|
| 1591 |
+interactive session with the `exec` command. |
|
| 1591 | 1592 |
|
| 1592 | 1593 |
**Example request**: |
| 1593 | 1594 |
|
| ... | ... |
@@ -1608,7 +1613,8 @@ starting the `exec` command. Otherwise, this API sets up an interactive session |
| 1608 | 1608 |
|
| 1609 | 1609 |
Json Parameters: |
| 1610 | 1610 |
|
| 1611 |
-- **execConfig** ? exec configuration. |
|
| 1611 |
+- **Detach** - Detach from the exec command |
|
| 1612 |
+- **Tty** - Boolean value to allocate a pseudo-TTY |
|
| 1612 | 1613 |
|
| 1613 | 1614 |
Status Codes: |
| 1614 | 1615 |
|
| ... | ... |
@@ -1515,7 +1515,6 @@ Sets up an exec instance in a running container `id` |
| 1515 | 1515 |
"Cmd":[ |
| 1516 | 1516 |
"date" |
| 1517 | 1517 |
], |
| 1518 |
- "Container":"e90e34656806", |
|
| 1519 | 1518 |
} |
| 1520 | 1519 |
|
| 1521 | 1520 |
**Example response**: |
| ... | ... |
@@ -1529,7 +1528,12 @@ Sets up an exec instance in a running container `id` |
| 1529 | 1529 |
|
| 1530 | 1530 |
Json Parameters: |
| 1531 | 1531 |
|
| 1532 |
-- **execConfig** ? exec configuration. |
|
| 1532 |
+- **AttachStdin** - Boolean value, attaches to stdin of the exec command. |
|
| 1533 |
+- **AttachStdout** - Boolean value, attaches to stdout of the exec command. |
|
| 1534 |
+- **AttachStderr** - Boolean value, attaches to stderr of the exec command. |
|
| 1535 |
+- **Tty** - Boolean value to allocate a pseudo-TTY |
|
| 1536 |
+- **Cmd** - Command to run specified as a string or an array of strings. |
|
| 1537 |
+ |
|
| 1533 | 1538 |
|
| 1534 | 1539 |
Status Codes: |
| 1535 | 1540 |
|
| ... | ... |
@@ -1540,8 +1544,9 @@ Status Codes: |
| 1540 | 1540 |
|
| 1541 | 1541 |
`POST /exec/(id)/start` |
| 1542 | 1542 |
|
| 1543 |
-Starts a previously set up exec instance `id`. If `detach` is true, this API returns after |
|
| 1544 |
-starting the `exec` command. Otherwise, this API sets up an interactive session with the `exec` command. |
|
| 1543 |
+Starts a previously set up exec instance `id`. If `detach` is true, this API |
|
| 1544 |
+returns after starting the `exec` command. Otherwise, this API sets up an |
|
| 1545 |
+interactive session with the `exec` command. |
|
| 1545 | 1546 |
|
| 1546 | 1547 |
**Example request**: |
| 1547 | 1548 |
|
| ... | ... |
@@ -1562,7 +1567,8 @@ starting the `exec` command. Otherwise, this API sets up an interactive session |
| 1562 | 1562 |
|
| 1563 | 1563 |
Json Parameters: |
| 1564 | 1564 |
|
| 1565 |
-- **execConfig** ? exec configuration. |
|
| 1565 |
+- **Detach** - Detach from the exec command |
|
| 1566 |
+- **Tty** - Boolean value to allocate a pseudo-TTY |
|
| 1566 | 1567 |
|
| 1567 | 1568 |
Status Codes: |
| 1568 | 1569 |
|
| ... | ... |
@@ -19,10 +19,11 @@ type ExecConfig struct {
|
| 19 | 19 |
|
| 20 | 20 |
func ExecConfigFromJob(job *engine.Job) *ExecConfig {
|
| 21 | 21 |
execConfig := &ExecConfig{
|
| 22 |
- User: job.Getenv("User"),
|
|
| 23 |
- Privileged: job.GetenvBool("Privileged"),
|
|
| 22 |
+ // TODO(vishh): Expose 'User' once it is supported. |
|
| 23 |
+ //User: job.Getenv("User"),
|
|
| 24 |
+ // TODO(vishh): Expose 'Privileged' once it is supported. |
|
| 25 |
+ //Privileged: job.GetenvBool("Privileged"),
|
|
| 24 | 26 |
Tty: job.GetenvBool("Tty"),
|
| 25 |
- Container: job.Getenv("Container"),
|
|
| 26 | 27 |
AttachStdin: job.GetenvBool("AttachStdin"),
|
| 27 | 28 |
AttachStderr: job.GetenvBool("AttachStderr"),
|
| 28 | 29 |
AttachStdout: job.GetenvBool("AttachStdout"),
|