I am using Elasticsearch and docker-compose inside a Jenkins pipeline to run my tests. Both Elasticsearch and the Node.js service seem to start properly from Docker, but performing a health check by hitting the http://elasticsearch:9200/_cat/health?h=st endpoint returns status code 000 from curl.
Running the tests and performing the health check from inside docker on local (macOS with Docker for Mac) working completely fine, but in Jenkins the health checks fail. Here is what my setup (with error log) looks like:
The entry point is run-tests.sh
Anypointers would be extraordinarily appreciated.
(Also posted on StackOverflow if you would prefer to chime in there: https://stackoverflow.com/questions/50369125/elasticsearch-in-docker-on-jenkins-fails-health-check