def get_containers(all=True,
                   trunc=False,
                   since=None,
                   before=None,
                   limit=-1,
                   host=False,
                   inspect=False):

    client = _get_client()
    status = base_status.copy()

    if host:
        status['host'] = {}
        status['host']['interfaces'] = __salt__['network.interfaces']()

    containers = client.containers(all=all,
                                   trunc=trunc,
                                   since=since,
                                   before=before,
                                   limit=limit)

    # Optionally for each container get more granular information from them
    # by inspecting the container
    if inspect:
        for container in containers:
            container_id = container.get('Id')
            if container_id:
                inspect = _get_container_infos(container_id)
                container['detail'] = inspect.copy()

    _valid(status, comment='All containers in out', out=containers)

    return status
Get a list of mappings representing all containers
dataset/ETHPy150Open saltstack/salt/salt/modules/dockerio.py/get_containers