def __init__(self, tasker, workflow, parent_registry=None, parent_registry_insecure=False,
                 check_platforms=False, inspect_only=False, parent_images_digests=None):
        """
        constructor

        :param tasker: DockerTasker instance
        :param workflow: DockerBuildWorkflow instance
        :param parent_registry: registry to enforce pulling from
        :param parent_registry_insecure: allow connecting to the registry over plain http
        :param check_platforms: validate parent images provide all platforms expected for the build
        """
        # call parent constructor
        super(PullBaseImagePlugin, self).__init__(tasker, workflow)

        self.check_platforms = check_platforms
        self.inspect_only = inspect_only
        source_registry = get_source_registry(self.workflow, {
            'uri': RegistryURI(parent_registry) if parent_registry else None,
            'insecure': parent_registry_insecure})

        if source_registry.get('uri'):
            self.parent_registry = source_registry['uri'].docker_uri
            self.parent_registry_insecure = source_registry['insecure']
            self.parent_registry_dockercfg_path = source_registry.get('dockercfg_path', None)
        else:
            self.parent_registry = None
            self.parent_registry_insecure = False
            self.parent_registry_dockercfg_path = None
        if parent_images_digests:
            self._load_parent_images_digests(parent_images_digests)
def __init__ ( self , tasker , workflow , parent_registry = None , parent_registry_insecure = False , check_platforms = False , inspect_only = False , parent_images_digests = None ) : super ( PullBaseImagePlugin , self ) . __init__ ( tasker , workflow ) self . check_platforms = check_platforms self . inspect_only = inspect_only source_registry = get_source_registry ( self . workflow , { 'uri' : RegistryURI ( parent_registry ) if parent_registry else None , 'insecure' : parent_registry_insecure } ) if source_registry . get ( 'uri' ) : self . parent_registry = source_registry [ 'uri' ] . docker_uri self . parent_registry_insecure = source_registry [ 'insecure' ] self . parent_registry_dockercfg_path = source_registry . get ( 'dockercfg_path' , None ) else : self . parent_registry = None self . parent_registry_insecure = False self . parent_registry_dockercfg_path = None if parent_images_digests : self . _load_parent_images_digests ( parent_images_digests )
constructor

        :param tasker: DockerTasker instance
        :param workflow: DockerBuildWorkflow instance
        :param parent_registry: registry to enforce pulling from
        :param parent_registry_insecure: allow connecting to the registry over plain http
        :param check_platforms: validate parent images provide all platforms expected for the build