(self, tmp_imagedir, imagerepo=None)
return repositories
Load a Docker file created with docker save, mimic Docker
        load. The file is a tarball containing several layers, each
        layer has metadata and data content (directory tree) stored
        as a tar file.
Load a Docker file created with docker save, mimic Docker
        load. The file is a tarball containing several layers, each
        layer has metadata and data content (directory tree) stored
        as a tar file.
Load a Docker file created with docker save mimic Docker load . The file is a tarball containing several layers each layer has metadata and data content ( directory tree ) stored as a tar file .
def load(self, tmp_imagedir, imagerepo=None):
        """Load a Docker file created with docker save, mimic Docker
        load. The file is a tarball containing several layers, each
        layer has metadata and data content (directory tree) stored
        as a tar file.
        """
        self._imagerepo = imagerepo
        structure = self._load_structure(tmp_imagedir)
        if not structure:
            Msg().err("Error: failed to load image structure")
            return []
        if "repositories" in structure and structure["repositories"]:
            repositories = self._load_repositories(structure)
        else:
            if not imagerepo:
                imagerepo = Unique().imagename()
            tag = Unique().imagetag()
            repositories = self._load_image(structure, imagerepo, tag)
        return repositories
def load ( self , tmp_imagedir , imagerepo = None ) : self . _imagerepo = imagerepo structure = self . _load_structure ( tmp_imagedir ) if not structure : Msg ( ) . err ( "Error: failed to load image structure" ) return [ ] if "repositories" in structure and structure [ "repositories" ] : repositories = self . _load_repositories ( structure ) else : if not imagerepo : imagerepo = Unique ( ) . imagename ( ) tag = Unique ( ) . imagetag ( ) repositories = self . _load_image ( structure , imagerepo , tag ) return repositories