mirror of https://github.com/docker/docker-py.git
Switch to send full AuthConfig object for build action
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 commit is contained in:
parent
946eb964ad
commit
ebcfab0a4c
|
|
@ -102,12 +102,6 @@ def encode_header(auth):
|
|||
return base64.b64encode(auth_json)
|
||||
|
||||
|
||||
def encode_full_header(auth):
|
||||
""" Returns the given auth block encoded for the X-Registry-Config header.
|
||||
"""
|
||||
return encode_header({'configs': auth})
|
||||
|
||||
|
||||
def parse_auth(entries):
|
||||
"""
|
||||
Parses authentication entries
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class Client(clientbase.ClientBase):
|
|||
if self._auth_configs:
|
||||
if headers is None:
|
||||
headers = {}
|
||||
headers['X-Registry-Config'] = auth.encode_full_header(
|
||||
headers['X-Registry-Config'] = auth.encode_header(
|
||||
self._auth_configs
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue