def get_running_in_container_id() -> Optional[str]:
    """
    Get the id of the currently running container
    """
    if not CGROUP_FILE.is_file():
        return None
    cgroup = CGROUP_FILE.read_text()
    for line in cgroup.splitlines(keepends=False):
        path = line.rpartition(":")[2]
        if path.startswith("/docker"):
            return path.removeprefix("/docker/")
    return None

    Get the id of the currently running container
    
core/testcontainers/core/utils.py