Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docker/types/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand All @@ -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).
"""
Expand Down Expand Up @@ -53,6 +53,8 @@ def test(self):

@test.setter
def test(self, value):
if isinstance(value, six.string_types):
value = ["CMD-SHELL", value]
self['Test'] = value

@property
Expand Down