Skip to content

Commit b3349c8

Browse files
committed
Merge branch 'pr-3147'
2 parents 26e0725 + b2378db commit b3349c8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docker/models/containers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ def status(self):
6363
return self.attrs['State']['Status']
6464
return self.attrs['State']
6565

66+
@property
67+
def health(self):
68+
"""
69+
The healthcheck status of the container.
70+
71+
For example, ``healthy`, or ``unhealthy`.
72+
"""
73+
return self.attrs.get('State', {}).get('Health', {}).get('Status', 'unknown')
74+
6675
@property
6776
def ports(self):
6877
"""

0 commit comments

Comments
 (0)