(self, tarfile, container_name)
return container_id
Import a tar file containing a clone of a udocker container
        created with export --clone and create local cloned container
        ready to use
Import a tar file containing a clone of a udocker container
        created with export --clone and create local cloned container
        ready to use
Import a tar file containing a clone of a udocker container created with export -- clone and create local cloned container ready to use
def import_clone(self, tarfile, container_name):
        """Import a tar file containing a clone of a udocker container
        created with export --clone and create local cloned container
        ready to use
        """
        if not os.path.exists(tarfile) and tarfile != '-':
            Msg().err("Error: tar file does not exist:", tarfile)
            return False
        if container_name:
            if self.localrepo.get_container_id(container_name):
                Msg().err("Error: container name already exists:",
                          container_name)
                return False
        container_id = ContainerStructure(self.localrepo).clone_fromfile(
            tarfile)
        if container_name:
            self.localrepo.set_container_name(container_id, container_name)
        return container_id
def import_clone ( self , tarfile , container_name ) : if not os . path . exists ( tarfile ) and tarfile != '-' : Msg ( ) . err ( "Error: tar file does not exist:" , tarfile ) return False if container_name : if self . localrepo . get_container_id ( container_name ) : Msg ( ) . err ( "Error: container name already exists:" , container_name ) return False container_id = ContainerStructure ( self . localrepo ) . clone_fromfile ( tarfile ) if container_name : self . localrepo . set_container_name ( container_id , container_name ) return container_id