def inside_a_container():
    """Detect if the process is inside a Docker container.

    Returns:
        bool: True if the microservice is running inside a docker container.
    """
    cgroups = open('/proc/1/cgroup', 'r').read()
    return 'docker' in cgroups
