Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
| ... | ... |
@@ -44,7 +44,7 @@ |
| 44 | 44 |
[`POST /containers/(id)/wait`](../reference/api/docker_remote_api_v1.9/#post--containers-(id)-wait) ** |
| 45 | 45 |
[`POST /containers/create`](../reference/api/docker_remote_api_v1.9/#post--containers-create) ** |
| 46 | 46 |
[`GET /containers/json`](../reference/api/docker_remote_api_v1.9/#get--containers-json) ** |
| 47 |
- [`GET /containers/resize`](../reference/api/docker_remote_api_v1.9/#get--containers-resize) ** |
|
| 47 |
+ [`POST /containers/(id)/resize`](../reference/api/docker_remote_api_v1.9/#get--containers-resize) ** |
|
| 48 | 48 |
|
| 49 | 49 |
**/events** |
| 50 | 50 |
[`GET /events`](../reference/api/docker_remote_api_v1.9/#get--events) ** |
| ... | ... |
@@ -471,13 +471,13 @@ Status Codes: |
| 471 | 471 |
|
| 472 | 472 |
### Resize a container TTY |
| 473 | 473 |
|
| 474 |
-`GET /containers/(id)/resize?h=<height>&w=<width>` |
|
| 474 |
+`POST /containers/(id)/resize?h=<height>&w=<width>` |
|
| 475 | 475 |
|
| 476 |
-Resize the TTY of container `id` |
|
| 476 |
+Resize the TTY for container with `id`. The container must be restarted for the resize to take effect. |
|
| 477 | 477 |
|
| 478 | 478 |
**Example request**: |
| 479 | 479 |
|
| 480 |
- GET /containers/4fa6e0f0c678/resize?h=40&w=80 HTTP/1.1 |
|
| 480 |
+ POST /containers/4fa6e0f0c678/resize?h=40&w=80 HTTP/1.1 |
|
| 481 | 481 |
|
| 482 | 482 |
**Example response**: |
| 483 | 483 |
|
| ... | ... |
@@ -489,7 +489,7 @@ Status Codes: |
| 489 | 489 |
|
| 490 | 490 |
- **200** – no error |
| 491 | 491 |
- **404** – No such container |
| 492 |
-- **500** – bad file descriptor |
|
| 492 |
+- **500** – Cannot resize container |
|
| 493 | 493 |
|
| 494 | 494 |
### Start a container |
| 495 | 495 |
|
| ... | ... |
@@ -364,28 +364,6 @@ Status Codes: |
| 364 | 364 |
- **404** – no such container |
| 365 | 365 |
- **500** – server error |
| 366 | 366 |
|
| 367 |
-### Resize a container TTY |
|
| 368 |
- |
|
| 369 |
-`GET /containers/(id)/resize?h=<height>&w=<width>` |
|
| 370 |
- |
|
| 371 |
-Resize the TTY of container `id` |
|
| 372 |
- |
|
| 373 |
-**Example request**: |
|
| 374 |
- |
|
| 375 |
- GET /containers/4fa6e0f0c678/resize?h=40&w=80 HTTP/1.1 |
|
| 376 |
- |
|
| 377 |
-**Example response**: |
|
| 378 |
- |
|
| 379 |
- HTTP/1.1 200 OK |
|
| 380 |
- Content-Length: 0 |
|
| 381 |
- Content-Type: text/plain; charset=utf-8 |
|
| 382 |
- |
|
| 383 |
-Status Codes: |
|
| 384 |
- |
|
| 385 |
-- **200** – no error |
|
| 386 |
-- **404** – No such container |
|
| 387 |
-- **500** – bad file descriptor |
|
| 388 |
- |
|
| 389 | 367 |
### Start a container |
| 390 | 368 |
|
| 391 | 369 |
`POST /containers/(id)/start` |
| ... | ... |
@@ -7,7 +7,7 @@ import ( |
| 7 | 7 |
) |
| 8 | 8 |
|
| 9 | 9 |
func TestResizeApiResponse(t *testing.T) {
|
| 10 |
- runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "true") |
|
| 10 |
+ runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top") |
|
| 11 | 11 |
out, _, err := runCommandWithOutput(runCmd) |
| 12 | 12 |
if err != nil {
|
| 13 | 13 |
t.Fatalf(out, err) |