diff options
Diffstat (limited to 'docker/types/healthcheck.py')
-rw-r--r-- | docker/types/healthcheck.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docker/types/healthcheck.py b/docker/types/healthcheck.py index 61857c2..9815018 100644 --- a/docker/types/healthcheck.py +++ b/docker/types/healthcheck.py @@ -14,7 +14,7 @@ class Healthcheck(DictType): - Empty list: Inherit healthcheck from parent image - ``["NONE"]``: Disable healthcheck - ``["CMD", args...]``: exec arguments directly. - - ``["CMD-SHELL", command]``: RUn command in the system's + - ``["CMD-SHELL", command]``: Run command in the system's default shell. If a string is provided, it will be used as a ``CMD-SHELL`` @@ -23,9 +23,9 @@ class Healthcheck(DictType): should be 0 or at least 1000000 (1 ms). timeout (int): The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). - retries (integer): The number of consecutive failures needed to + retries (int): The number of consecutive failures needed to consider a container as unhealthy. - start_period (integer): Start period for the container to + start_period (int): Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). """ @@ -53,6 +53,8 @@ class Healthcheck(DictType): @test.setter def test(self, value): + if isinstance(value, six.string_types): + value = ["CMD-SHELL", value] self['Test'] = value @property |