This option was never functional, and was not intended
to be added to the "container create" API, so let's
remove it, because it has been removed in Docker 17.05,
and was broken in versions before that; see
- https://github.com/moby/moby/issues/32355 --init-path does not seem to work
- https://github.com/moby/moby/pull/32470 remove --init-path from client
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This fix lets the responsability of changing the
protocol to `parse_host` afterwards, letting
`base_url` with the original value.
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
- Add a sleep of 2 seconds to be sure the logs
can be requested before the daemon removes the
container when run with auto_remove=True
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
The integration tests require restarting the swarm once for each
test. I had done so manually with self.init_swarm(force_new_cluster=True)
but that wasn't resetting the swarm state correctly. The usual
test teardown procedure cleans up correctly.
Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
Also corrected a documentation error: the default API version from
constants is currently 1.35, not 1.30 as was sometimes listed.
Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
Removed accidental whitespace.
Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
This test was testing for a 500 status, but this status
is actually a bug in the API (as it's due to an invalid
request), and the API should actually return a 400 status.
To make this test handle both situations, relax the test
to accept either a 4xx or 5xx status.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Check that the return value against the various combination of
parameters this function can take (tty, stream, and demux).
This commit also fixes a bug that the tests uncovered a bug in
consume_socket_output.
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
Pulling an image with option `stream=True` like this:
```
client.api.pull('docker.io/user/repo_name', tag='latest', stream=True)
```
without consuming the generator oftentimes results in premature drop of the connection. Docker daemon tries to send progress of pulling the image to the client, but it encounters an error (broken pipe) and therefore cancells the pull action:
```
Thread 1 "dockerd-dev" received signal SIGPIPE, Broken pipe.
ERRO[2018-09-03T05:12:35.746497638+02:00] Not continuing with pull after error: context canceled
```
As described in issue #2116, even though client receives response with status code 200, image is not pulled.
Closes#2116
Signed-off-by: Przemysław Adamek <adw1n@users.noreply.github.com>
The method now uses parsing methods from urllib to better split provided URLs.
Addresses containing query strings, parameters, passwords or fragments no longer fail silently.
SSH addresses containing paths are no longer accepted.
Signed-off-by: Joffrey F <joffrey@docker.com>