testcontainers-node icon indicating copy to clipboard operation
testcontainers-node copied to clipboard

Support for health checks using CMD rather than CMD-SHELL

Open richjharris opened this issue 3 years ago • 1 comments

Currently only CMD-SHELL health checks are supported which require a shell on the docker container to run. distroless docker images like mockserver don't have a shell so that mechanism doesn't work, see https://github.com/GoogleContainerTools/distroless/issues/183.

To support docker containers without a shell the health check needs to be in the format

test: ['CMD', '/path/to/program', 'arg1', 'arg2', 'arg3']

Fixes #342

richjharris avatar Apr 06 '22 07:04 richjharris

@cristianrgreco I've updated the PR to make the syntax for the health check test syntax more specific.

richjharris avatar Apr 06 '22 13:04 richjharris

Will be looking to implement/merge this PR with https://github.com/testcontainers/testcontainers-node/pull/405

cristianrgreco avatar Oct 22 '22 21:10 cristianrgreco