Closing the HTTP connection requesting a push or pull will cancel the
push or pull. This behavior also applies to the CLI.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
| ... | ... |
@@ -103,6 +103,9 @@ This section lists each version from latest to oldest. Each listing includes a |
| 103 | 103 |
consistent with other date/time values returned by the API. |
| 104 | 104 |
* `AuthConfig` now supports a `registrytoken` for token based authentication |
| 105 | 105 |
* `POST /containers/create` now has a 4M minimum value limit for `HostConfig.KernelMemory` |
| 106 |
+* Pushes initated with `POST /images/(name)/push` and pulls initiated with `POST /images/create` |
|
| 107 |
+ will be cancelled if the HTTP connection making the API request is closed before |
|
| 108 |
+ the push or pull completes. |
|
| 106 | 109 |
|
| 107 | 110 |
### v1.21 API changes |
| 108 | 111 |
|
| ... | ... |
@@ -1530,6 +1530,7 @@ Query Parameters: |
| 1530 | 1530 |
|
| 1531 | 1531 |
- **fromImage** – Name of the image to pull. The name may include a tag or |
| 1532 | 1532 |
digest. This parameter may only be used when pulling an image. |
| 1533 |
+ The pull is cancelled if the HTTP connection is closed. |
|
| 1533 | 1534 |
- **fromSrc** – Source to import. The value may be a URL from which the image |
| 1534 | 1535 |
can be retrieved or `-` to read the image from the request body. |
| 1535 | 1536 |
This parameter may only be used when importing an image. |
| ... | ... |
@@ -1755,6 +1756,8 @@ If you wish to push an image on to a private registry, that image must already h |
| 1755 | 1755 |
into a repository which references that registry `hostname` and `port`. This repository name should |
| 1756 | 1756 |
then be used in the URL. This duplicates the command line's flow. |
| 1757 | 1757 |
|
| 1758 |
+The push is cancelled if the HTTP connection is closed. |
|
| 1759 |
+ |
|
| 1758 | 1760 |
**Example request**: |
| 1759 | 1761 |
|
| 1760 | 1762 |
POST /images/registry.acme.com:5000/test/push HTTP/1.1 |
| ... | ... |
@@ -98,12 +98,9 @@ adding a `.dockerignore` file to that directory as well. For information on |
| 98 | 98 |
creating one, see the [.dockerignore file](../builder.md#dockerignore-file). |
| 99 | 99 |
|
| 100 | 100 |
If the Docker client loses connection to the daemon, the build is canceled. |
| 101 |
-This happens if you interrupt the Docker client with `ctrl-c` or if the Docker |
|
| 102 |
-client is killed for any reason. |
|
| 103 |
- |
|
| 104 |
-> **Note:** |
|
| 105 |
-> Currently only the "run" phase of the build can be canceled until pull |
|
| 106 |
-> cancellation is implemented). |
|
| 101 |
+This happens if you interrupt the Docker client with `CTRL-c` or if the Docker |
|
| 102 |
+client is killed for any reason. If the build initiated a pull which is still |
|
| 103 |
+running at the time the build is cancelled, the pull is cancelled as well. |
|
| 107 | 104 |
|
| 108 | 105 |
## Return code |
| 109 | 106 |
|
| ... | ... |
@@ -49,3 +49,6 @@ use `docker pull`: |
| 49 | 49 |
# manually specifies the path to the default Docker registry. This could |
| 50 | 50 |
# be replaced with the path to a local registry to pull from another source. |
| 51 | 51 |
# sudo docker pull myhub.com:8080/test-image |
| 52 |
+ |
|
| 53 |
+Killing the `docker pull` process, for example by pressing `CTRL-c` while it is |
|
| 54 |
+running in a terminal, will terminate the pull operation. |
| ... | ... |
@@ -19,3 +19,6 @@ parent = "smn_cli" |
| 19 | 19 |
|
| 20 | 20 |
Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com) |
| 21 | 21 |
registry or to a self-hosted one. |
| 22 |
+ |
|
| 23 |
+Killing the `docker push` process, for example by pressing `CTRL-c` while it is |
|
| 24 |
+running in a terminal, will terminate the push operation. |