コード例 #1
0
 def image_inspect(self, image):
     try:
         return self._client.inspect_image(image)
     except docker.errors.NotFound:
         raise ContainerImageNotFound("%s not pulled, cannot get digest" %
                                      image,
                                      image=image)
コード例 #2
0
 def image_inspect(self, image):
     try:
         return self._run_docker(subcommand='image inspect', args=image)[0]
     except (IndexError, ContainerCLIError) as exc:
         msg = f"{image} not pulled, cannot get digest"
         if exc.stdout == '[]' and exc.stderr == f'Error: no such image: {image}':
             log.warning(msg, image)
             return []
         else:
             raise ContainerImageNotFound(msg, image=image)
コード例 #3
0
ファイル: docker.py プロジェクト: projectitus/galaxy
 def image_inspect(self, image):
     try:
         return self._run_docker(subcommand='image inspect', args=image)
     except ContainerCLIError as exc:
         msg = "%s not pulled, cannot get digest" % image
         if exc.stdout == '[]' and exc.stderr == 'Error: no such image: {image}'.format(
                 image=image):
             log.warning(msg, image)
             return []
         else:
             raise ContainerImageNotFound(msg, image=image)