def in_docker() -> bool:
    """
    Check if the session is running inside a docker

    .. code-block:: python

        if in_docker():
            print("OMG we are stock in a Docker ! Get me out of here !")
        else:
            print("We are safe")

    Returns:
        bool: True if inside a docker
    """
    try:
        with open("/proc/1/cgroup", "rt") as ifh:
            in_dck = "docker" in ifh.read()
    # pylint: disable=W0703
    except Exception:
        in_dck = False

    return in_dck