docker: support polling image by digest (#2932)
This commit is contained in:
parent
1db444cdc2
commit
4971c7fe82
1 changed files with 7 additions and 7 deletions
|
@ -589,13 +589,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:
|
||||||
|
resource, tag = resource.split(s, 1)
|
||||||
if registry:
|
if registry:
|
||||||
resource = '/'.join((registry, resource))
|
resource = '/'.join((registry, resource))
|
||||||
if tag == "":
|
break
|
||||||
tag = "latest"
|
|
||||||
else:
|
else:
|
||||||
tag = "latest"
|
tag = "latest"
|
||||||
resource = image
|
resource = image
|
||||||
|
|
Loading…
Reference in a new issue