diff options
author | Milas Bowman <milas.bowman@docker.com> | 2022-07-29 16:02:47 -0400 |
---|---|---|
committer | Milas Bowman <milas.bowman@docker.com> | 2022-07-29 16:02:47 -0400 |
commit | 547cc5794d607a2da7f65b548957f39bbc74891c (patch) | |
tree | 90eeecd880b822b5593fe14f88379e06f1d36bbd | |
parent | 73421027be04c97fc6f50da0647ba47388ed60e5 (diff) | |
parent | 003a16503a6a760ece2cffa549ebf25e0474108c (diff) | |
download | docker-py-547cc5794d607a2da7f65b548957f39bbc74891c.tar.gz |
Merge branch 'docs-healthcheck'
Manually merging #2595 to include a tiny fix.
-rw-r--r-- | docker/models/containers.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/docker/models/containers.py b/docker/models/containers.py index 313d47d..c37df55 100644 --- a/docker/models/containers.py +++ b/docker/models/containers.py @@ -605,7 +605,28 @@ class ContainerCollection(Collection): group_add (:py:class:`list`): List of additional group names and/or IDs that the container process will run as. healthcheck (dict): Specify a test to perform to check that the - container is healthy. + container is healthy. The dict takes the following keys: + + - test (:py:class:`list` or str): Test to perform to determine + container health. Possible values: + + - Empty list: Inherit healthcheck from parent image + - ``["NONE"]``: Disable healthcheck + - ``["CMD", args...]``: exec arguments directly. + - ``["CMD-SHELL", command]``: Run command in the system's + default shell. + + If a string is provided, it will be used as a ``CMD-SHELL`` + command. + - interval (int): The time to wait between checks in + nanoseconds. It 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 (int): The number of consecutive failures needed to + consider a container as unhealthy. + - 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). hostname (str): Optional hostname for the container. init (bool): Run an init inside the container that forwards signals and reaps processes |