Now uses attrs from docker py to grab the ID. Fixes
@@ -418,10 +418,10 @@ class Plugin:
close_fds=True)
self.logger.info("Pulling " + name[1] + "\n" +
str(output))
- sha_str = "Digest: sha256:"
- for line in output.split('\n'):
- if line.startswith(sha_str):
- image_id = line.split(sha_str)[1][:12]
+
+ image_attrs = d_client.images.get(image_name).attrs
+ image_id = image_attrs['Id'].split(':')[1][:12]
+
if image_id:
template.set_option(section, "built", "yes")
template.set_option(section, "image_id", image_id)
