The daemon already pings the registry, so doing it on our end is
redundant and error-prone.
The `insecure_registry` argument to `push()`, `pull()` and `login()` has
been deprecated - in the latter case, it wasn't being used anyway.
The `insecure` argument to `docker.auth.resolve_repository_name()` has
also been deprecated.
`docker.utils.ping_registry()` has been deprecated.
`docker.auth.expand_registry_url()` has been removed.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
In order to support the docker API for version 1.7+, this command
changes the way the `X-Registry-Config` header is sent when attempting
to build an image.
This changes raises docker.errors.NotFound on 404 errors. This gives
client code the ability to differentiate between "an image does not
exist" and "you are using the api incorrectly".
This inherits from docker.errors.APIError so it will not affect any
existing code.
In testing Docker master with the latest docker-py release, a few new
tests exist which don't set the base_url, which is not the default unix
socket location when Docker's integration tests are running.
Also, there is no guarantee syslog can be reached from a test container
so I wrapped that test with the NOT_ON_HOST skip logic.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Treat output from TTY-enabled containers as raw streams, rather than
as multiplexed streams. The docker API docs specify that tty-enabled
containers don't multiplex. Also update tests to pass with these
changes, and changed the code used to read raw streams to not
read line-by-line, and to not skip empty lines.
Addresses issue #630
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
The docker engine may send empty chunks of data in the stream
(especially since https://github.com/docker/docker/pull/13033)
They should not be taken for EOF
Signed-off-by: Anthony Baire <Anthony.Baire@irisa.fr>
This tries to load Docker authentication info from
~/.docker/config.json before falling back to its legacy location and
format at ~/.dockercfg.
Resolves https://github.com/docker/docker-py/issues/648