mirror of https://github.com/docker/docker-py.git
Merge branch 'pr-3147'
This commit is contained in:
commit
b3349c88ef
|
@ -63,6 +63,15 @@ class Container(Model):
|
|||
return self.attrs['State']['Status']
|
||||
return self.attrs['State']
|
||||
|
||||
@property
|
||||
def health(self):
|
||||
"""
|
||||
The healthcheck status of the container.
|
||||
|
||||
For example, ``healthy`, or ``unhealthy`.
|
||||
"""
|
||||
return self.attrs.get('State', {}).get('Health', {}).get('Status', 'unknown')
|
||||
|
||||
@property
|
||||
def ports(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue