def commit_container(self, container_id, image=None, message=None):
        """
        create image from provided container

        :param container_id: str
        :param image: ImageName
        :param message: str
        :return: image_id
        """
        logger.info("committing container '%s'", container_id)
        logger.debug("container_id = '%s', image = '%s', message = '%s'",
                     container_id, image, message)
        tag = None
        if image:
            tag = image.tag
            image = image.to_str(tag=False)
        response = self.d.commit(container_id, repository=image, tag=tag, message=message)
        logger.debug("response = '%s'", response)
        try:
            return response['Id']
        except __HOLE__:
            logger.error("ID missing from commit response")
            raise RuntimeError("ID missing from commit response")
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/core.py/DockerTasker.commit_container