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:
Matt Outten 2015-07-17 15:48:52 -04:00
parent 946eb964ad
commit ebcfab0a4c
2 changed files with 1 additions and 7 deletions

View File

@ -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

View File

@ -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
)