Skip to content

Commit

Permalink
Merge branch 'pr-3147'
Browse files Browse the repository at this point in the history
  • Loading branch information
milas committed Nov 20, 2023
2 parents 26e0725 + b2378db commit b3349c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docker/models/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ def status(self):
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):
"""
Expand Down

0 comments on commit b3349c8

Please sign in to comment.