B&R: Pass the credential of local registry when pulling images
The commit fixes the netapp images backup failure due to docker pull authentication issue. Change-Id: I6aea692c6c7d507d58ac564808eb91b6b0fcebaf Closes-Bug: 1896253 Signed-off-by: Angie Wang <angie.wang@windriver.com>
This commit is contained in:
parent
161641e896
commit
fd60f4b271
|
@ -79,7 +79,8 @@ def pull_image_from_local_registry(image):
|
|||
for i in range(MAX_DOWNLOAD_ATTEMPTS):
|
||||
try:
|
||||
client = docker.APIClient()
|
||||
for line in client.pull(image, stream=True):
|
||||
auth = get_local_registry_auth()
|
||||
for line in client.pull(image, auth_config=auth, stream=True):
|
||||
j = json.loads(line)
|
||||
if 'errorDetail' in j:
|
||||
raise Exception("Error: " + str(j['errorDetail']))
|
||||
|
|
Loading…
Reference in New Issue