Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Commit

Permalink
docker: support credentials for accessing the source registry
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <[email protected]>

Closes: #1120
Approved by: ashcrow
  • Loading branch information
giuseppe authored and rh-atomic-bot committed Oct 26, 2017
1 parent 1c877c5 commit 30c9504
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Atomic/backends/_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,13 @@ def pull_image(self, image, remote_image_obj, **kwargs):
if '@sha256:' in image:
image = image.replace("@sha256:", ":")

src_creds = kwargs.get('src_creds')
insecure = True if util.is_insecure_registry(self.d.info()['RegistryConfig'], registry) else False
trust = Trust()
trust.discover_sigstore(fq_name)
util.write_out("Pulling {} ...".format(fq_name))
util.skopeo_copy("docker://{}".format(fq_name), image, debug=debug, insecure=insecure,
policy_filename=trust.policy_filename)
policy_filename=trust.policy_filename, src_creds=src_creds)
return 0

def delete_container(self, container, force=False):
Expand Down

0 comments on commit 30c9504

Please sign in to comment.