Skip to content

docs: note --health-cmd always uses CMD-SHELL - #7163

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:docs/health-cmd-shell-scratch-3719
Open

docs: note --health-cmd always uses CMD-SHELL#7163
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:docs/health-cmd-shell-scratch-3719

Conversation

@locker95

@locker95 locker95 commented Aug 7, 2026

Copy link
Copy Markdown

Dockerfile HEALTHCHECK can pick CMD vs CMD-SHELL, but docker run --health-cmd always shells out. That bites scratch images with no /bin/sh.

Documented the difference and pointed at Dockerfile HEALTHCHECK CMD for those cases.

Fixes #3719

Runtime health checks go through the image shell, so scratch-based
images need HEALTHCHECK CMD in the Dockerfile instead of --health-cmd.

Fixes docker#3719

Signed-off-by: Dean Chen <862469039@qq.com>
@locker95
locker95 requested review from a team and thaJeztah as code owners August 7, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image from "scratch" has no shell, but passing the --health-cmd to docker run uses CMD-SHELL

1 participant