Skip to content

Commit ebcfab0

Browse files
committed
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.
1 parent 946eb96 commit ebcfab0

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

docker/auth/auth.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ def encode_header(auth):
102102
return base64.b64encode(auth_json)
103103

104104

105-
def encode_full_header(auth):
106-
""" Returns the given auth block encoded for the X-Registry-Config header.
107-
"""
108-
return encode_header({'configs': auth})
109-
110-
111105
def parse_auth(entries):
112106
"""
113107
Parses authentication entries

docker/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def build(self, path=None, tag=None, quiet=False, fileobj=None,
139139
if self._auth_configs:
140140
if headers is None:
141141
headers = {}
142-
headers['X-Registry-Config'] = auth.encode_full_header(
142+
headers['X-Registry-Config'] = auth.encode_header(
143143
self._auth_configs
144144
)
145145

0 commit comments

Comments
 (0)