Closed lonix1 closed 11 months ago
I found this solution:
healthcheck:
test: 'php -r "exit(strpos(file_get_contents(\"http://localhost:8080/\"), \"Adminer\") !== false ? 0 : 1);"'
I'd have never thought of that as I'm not a php dev. Thanks Tim!
This image was updated recently to 4.8.1 which was very exciting as it hadn't been updated in years (PS: thanks!)
But our containers started failing, and upon some investgation I realised it's because the new version is based on a base image that no longer supplies curl, wget or nc, etc. - so the healthchecks were failing.
Any of those commands can be used for healthchecks, and probably others too. But the base image has nothing useful. It seems to be a debian image, which is surprising, as even the busybox and alpine images at least have nc (and are significantly smaller).