docker: support polling image by digest (#2932)

This commit is contained in:
Alexey Wasilyev 2016-04-16 22:46:02 +03:00 committed by René Moser
parent a39d11e8f5
commit 1c3071af61

View file

@ -585,13 +585,13 @@ def get_split_image_tag(image):
else: else:
registry, resource = None, image registry, resource = None, image
# now we can determine if image has a tag # now we can determine if image has a tag or a digest
if ':' in resource: for s in ['@',':']:
resource, tag = resource.split(':', 1) if s in resource:
if registry: resource, tag = resource.split(s, 1)
resource = '/'.join((registry, resource)) if registry:
if tag == "": resource = '/'.join((registry, resource))
tag = "latest" break
else: else:
tag = "latest" tag = "latest"
resource = image resource = image