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 • 3 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']

richjharris avatar Apr 06 '22 06:04 richjharris

Here is a PR to support CMD health checks https://github.com/testcontainers/testcontainers-node/pull/343

richjharris avatar Apr 06 '22 07:04 richjharris

@cristianrgreco is there an expected time frame for this to get merged?

richjharris avatar Jun 10 '22 06:06 richjharris

@richjharris sorry for the delay, haven't had much time to work on this lately. I'm hoping to get this done in the next couple of weeks

cristianrgreco avatar Jun 22 '22 08:06 cristianrgreco

Released in 9.0.0

cristianrgreco avatar Oct 30 '22 13:10 cristianrgreco