def _clone(self, cid):
        """
        Create a temporary image snapshot from a given cid.

        Temporary image snapshots are marked with a sentinel label
        so that they can be cleaned on unmount.
        """
        try:
            iid = self.client.commit(
                container=cid,
                conf={
                    'Labels': {
                        'io.projectatomic.Temporary': 'true'
                    }
                }
            )['Id']
        except docker.errors.APIError as ex:
            raise MountError(str(ex))
        self.tmp_image = iid
        return self._create_temp_container(iid)
def _clone ( self , cid ) : try : iid = self . client . commit ( container = cid , conf = { 'Labels' : { 'io.projectatomic.Temporary' : 'true' } } ) [ 'Id' ] except docker . errors . APIError as ex : raise MountError ( str ( ex ) ) self . tmp_image = iid return self . _create_temp_container ( iid )
Create a temporary image snapshot from a given cid.

        Temporary image snapshots are marked with a sentinel label
        so that they can be cleaned on unmount.