@@ -605,7 +605,28 @@ def run(self, image, command=None, stdout=True, stderr=False,
605
605
group_add (:py:class:`list`): List of additional group names and/or
606
606
IDs that the container process will run as.
607
607
healthcheck (dict): Specify a test to perform to check that the
608
- container is healthy.
608
+ container is healthy. The dict takes the following keys:
609
+
610
+ - test (:py:class:`list` or str): Test to perform to determine
611
+ container health. Possible values:
612
+
613
+ - Empty list: Inherit healthcheck from parent image
614
+ - ``["NONE"]``: Disable healthcheck
615
+ - ``["CMD", args...]``: exec arguments directly.
616
+ - ``["CMD-SHELL", command]``: Run command in the system's
617
+ default shell.
618
+
619
+ If a string is provided, it will be used as a ``CMD-SHELL``
620
+ command.
621
+ - interval (int): The time to wait between checks in
622
+ nanoseconds. It should be 0 or at least 1000000 (1 ms).
623
+ - timeout (int): The time to wait before considering the check
624
+ to have hung. It should be 0 or at least 1000000 (1 ms).
625
+ - retries (int): The number of consecutive failures needed to
626
+ consider a container as unhealthy.
627
+ - start_period (int): Start period for the container to
628
+ initialize before starting health-retries countdown in
629
+ nanoseconds. It should be 0 or at least 1000000 (1 ms).
609
630
hostname (str): Optional hostname for the container.
610
631
init (bool): Run an init inside the container that forwards
611
632
signals and reaps processes
0 commit comments