MCPcopy Index your code
hub / github.com/docker/docker-py / containers

Method containers

docker/models/networks.py:19–27  ·  view source on GitHub ↗

The containers that are connected to the network, as a list of :py:class:`~docker.models.containers.Container` objects.

(self)

Source from the content-addressed store, hash-verified

17
18 @property
19 def containers(self):
20 """
21 The containers that are connected to the network, as a list of
22 :py:class:`~docker.models.containers.Container` objects.
23 """
24 return [
25 self.client.containers.get(cid) for cid in
26 (self.attrs.get('Containers') or {}).keys()
27 ]
28
29 def connect(self, container, *args, **kwargs):
30 """

Callers 1

listMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected