You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
container: add --health-cmd-mode for CMD healthcheck form
docker run/create always wrapped --health-cmd in CMD-SHELL, which fails
on scratch and other shell-less images. Add --health-cmd-mode=exec to
produce the exec (CMD) form, matching Dockerfile HEALTHCHECK CMD
behavior. The default "shell" preserves existing --health-cmd behavior
unchanged.
Fixes#3719
Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
Copy file name to clipboardExpand all lines: docs/reference/commandline/container_create.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ Create a new container
48
48
|`--gpus`|`gpu-request`|| GPU devices to add to the container ('all' to pass all GPUs) |
49
49
|`--group-add`|`list`|| Add additional groups to join |
50
50
|`--health-cmd`|`string`|| Command to run to check health |
51
+
|`--health-cmd-mode`|`string`|`shell`| Healthcheck command mode: `shell` wraps the command in CMD-SHELL, `exec` uses the exec form (CMD) required for shell-less images |
51
52
|`--health-interval`|`duration`|`0s`| Time between running the check (ms\|s\|m\|h) (default 0s) |
52
53
|`--health-retries`|`int`|`0`| Consecutive failures needed to report unhealthy |
53
54
|`--health-start-interval`|`duration`|`0s`| Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
Copy file name to clipboardExpand all lines: docs/reference/commandline/container_run.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ Create and run a new container from an image
50
50
|[`--gpus`](#gpus)|`gpu-request`|| GPU devices to add to the container ('all' to pass all GPUs) |
51
51
|`--group-add`|`list`|| Add additional groups to join |
52
52
|`--health-cmd`|`string`|| Command to run to check health |
53
+
|`--health-cmd-mode`|`string`|`shell`| Healthcheck command mode: `shell` wraps the command in CMD-SHELL, `exec` uses the exec form (CMD) required for shell-less images |
53
54
|`--health-interval`|`duration`|`0s`| Time between running the check (ms\|s\|m\|h) (default 0s) |
54
55
|`--health-retries`|`int`|`0`| Consecutive failures needed to report unhealthy |
55
56
|`--health-start-interval`|`duration`|`0s`| Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
Copy file name to clipboardExpand all lines: docs/reference/commandline/create.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ Create a new container
48
48
|`--gpus`|`gpu-request`|| GPU devices to add to the container ('all' to pass all GPUs) |
49
49
|`--group-add`|`list`|| Add additional groups to join |
50
50
|`--health-cmd`|`string`|| Command to run to check health |
51
+
|`--health-cmd-mode`|`string`|`shell`| Healthcheck command mode: `shell` wraps the command in CMD-SHELL, `exec` uses the exec form (CMD) required for shell-less images |
51
52
|`--health-interval`|`duration`|`0s`| Time between running the check (ms\|s\|m\|h) (default 0s) |
52
53
|`--health-retries`|`int`|`0`| Consecutive failures needed to report unhealthy |
53
54
|`--health-start-interval`|`duration`|`0s`| Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
Copy file name to clipboardExpand all lines: docs/reference/commandline/run.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ Create and run a new container from an image
50
50
|`--gpus`|`gpu-request`|| GPU devices to add to the container ('all' to pass all GPUs) |
51
51
|`--group-add`|`list`|| Add additional groups to join |
52
52
|`--health-cmd`|`string`|| Command to run to check health |
53
+
|`--health-cmd-mode`|`string`|`shell`| Healthcheck command mode: `shell` wraps the command in CMD-SHELL, `exec` uses the exec form (CMD) required for shell-less images |
53
54
|`--health-interval`|`duration`|`0s`| Time between running the check (ms\|s\|m\|h) (default 0s) |
54
55
|`--health-retries`|`int`|`0`| Consecutive failures needed to report unhealthy |
55
56
|`--health-start-interval`|`duration`|`0s`| Time between running the check during the start period (ms\|s\|m\|h) (default 0s) |
0 commit comments