Skip to content

client.networks.containers() is always empty #1775

@neilconway

Description

@neilconway
>>> import docker
>>> d = docker.from_env()
>>> [n.name for n in d.networks.list()]
['pedlintegrationtests_default', 'bridge', 'host', 'none']
>>> [n.containers for n in d.networks.list()]
[[], [], [], []]
$ docker network inspect pedlintegrationtests_default | jq '.[0].Containers | length'
4
$ pip freeze | grep docker && python --version && docker version
docker==2.5.1
docker-compose==1.16.1
docker-pycreds==0.2.1
dockerpty==0.4.1
nvidia-docker-compose==0.1.4
Python 3.5.2
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:18 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:56 2017
 OS/Arch:      linux/amd64
 Experimental: false

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions