mirror of https://github.com/docker/docker-py.git
Merge branch 'main' into py3.12-compat
This commit is contained in:
commit
2799f8b843
|
|
@ -63,6 +63,15 @@ class Container(Model):
|
||||||
return self.attrs['State']['Status']
|
return self.attrs['State']['Status']
|
||||||
return self.attrs['State']
|
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
|
@property
|
||||||
def ports(self):
|
def ports(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue