Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def find_image(client, repo, tag='latest'):
    images = client.images(repo)
    images = filter(lambda x: (repo + ':' + tag) in x['RepoTags'], images)
    return (images or [None])[0]
        


src/s/b/sbgsdk-0.5.4/sbdk/docker/runner.py   sbgsdk(Download)
 
from sbdk.docker.container import Container
from sbdk.docker.utils import find_image, parse_repository_tag
from docker.client import APIError
from sbgsdk.util import handle_signal
                repo, tag = parse_repository_tag(self.image_id)
                self.client.pull(repo, tag)
                self.image_id = find_image(self.client, repo, tag)
                config['Image'] = self.image_id
                cont = self.client.create_container_from_config(config)