def get_id_name_for_this_service(container_infos):
    """Get a dict mapping id->name for all containers corresponding to the
    current service.
    """
    ids = []
    for info in container_infos:
        if info["is_this_service"]:
            ids.append((info["name"], info["id"]))  # name first, for sorting
    ids.sort()
    return {id: name for name, id in ids}