| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Joffrey F <joffrey@docker.com>
|
|
|
|
| |
Signed-off-by: Pavel Kravchenko <kpavel@il.ibm.com>
|
|
|
|
| |
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
|
|
|
|
|
|
|
| |
The structure of the fake config dictionary was not reflective of what
actual parsed config looks like.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
More relaxed version that matches the constraints imposed by the
current version of the docker daemon.
Few unit tests to verify the new cases.
Client.pull was trying to set the tag value when it wasn't supposed
to, fixed now.
utils.parse_repository_tag is simpler and supports @sha... notation
Signed-off-by: Joffrey F <joffrey@docker.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Docker-py couldn't pull private images if the account have non ascii chars
in either user or password. It that case an exception ending with no auth
credentials.
Instead docker client (golang) don't suffer this issue.
Also add a test to check the login or password even with non ascii char have
a valid auth dictionary
Signed-off-by: Alejandro Brito Monedero <abrito@alea-soluciones.com>
|
|
|
|
|
|
|
|
|
| |
When load_config found and auths section it didn't call parse_auth only with
the auths section. Instead it called parse_auth with all the configuration.
There is also a test to check this case
Signed-off-by: Alejandro Brito Monedero <alejandro.monedero@gmail.com>
|
|\
| |
| | |
Use DOCKER_CONFIG environment variable to look up auth config
|
| |
| |
| |
| |
| |
| | |
When provided, default paths are ignored.
Signed-off-by: Joffrey F <joffrey@docker.com>
|
|/
|
|
|
|
| |
+ regression test
Signed-off-by: Joffrey F <joffrey@docker.com>
|
|
|
|
| |
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
|
|\
| |
| |
| | |
moutten-fix-build-auth
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This makes docker-py consistent with Docker's newish way of establishing the path to .dockercfg:
https://github.com/docker/docker/blob/master/pkg/homedir/homedir.go
|
| |
|
|
|
|
| |
Signed-off-by: dlorenc <lorenc.d@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
Instead of expanding the registry name we're looking for to a full URL,
strip entries in the authconfig down to just the hostname.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
|
| |
|
| |
|
|
|
|
| |
repository param for client.pull
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In docker-py's auth.py the functions 'resolve_repository_name' and 'expand_registry_url' work together to result a hostname prefix to a base URL suitable for interaction as a Docker registry.
For example, "docker push foo.com/bar/baz" would try to resolve the hostname "foo.com".
These functions loosely correlate to 'ResolveRepositoryName' and 'newEndpoint' in the docker client code, respectively.
You can see from their implementations:
- ResolveRepositoryName: https://github.com/docker/docker/blob/master/registry/registry.go#L191
- newEndpoint: https://github.com/docker/docker/blob/master/registry/endpoint.go#L71
that neither of them appends 'v1' to the hostname during resolution.
This change simply removes the 'v1' suffix from these code paths, which enables docker-py to authenticate against private registries with which the docker client can already.
|
|
|
|
| |
pushing/pulling
|
| |
|
|
|
|
|
|
|
|
|
| |
With more granular and specific exceptions user
will be able to handle errors properly.
Also changed raising of Exception to more specific
TypeError which python raises in case of wrong
arguments.
|
| |
|
|
|
|
| |
Required for "FROM " lines that pull from private registries
|
|
|
|
|
|
| |
Next rules were broken
* E265 block comment should start with '# '
* E713 test for membership should be 'not in'
|
| |
|
|
|
|
| |
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
|
| |
|
|
imports.
|