For some reason, using the elastic/elasticsearch:7.15.0 docker image in Gitlab pipelines does not seem to work. The health check fails, and even if I added a 30 second wait, I am unable to connect to port 9200.
My CI file looks like this:
- name: elastic/elasticsearch:7.15.0
command: [ "bin/elasticsearch", "-Expack.security.enabled=false", "-Ediscovery.type=single-node" ]
alias: elasticsearch
The strange thing, however, is that it works perfectly fine when I use elastic/elasticsearch:7.1.1
. Sadly, this is not an option for me because I need certain features from 7.15.
Am I overlooking something? Is this something I can fix or is this somehow an issue with Gitlab?
I am getting the following output:
Starting service elastic/elasticsearch:7.15.0 ...
Pulling docker image elastic/elasticsearch:7.15.0 ...
Using docker image sha256:53ecd52afaa07a76b74eab63152a65d860f1e8e54d0f5d93c37b18fc80eb9e26 for elastic/elasticsearch:7.15.0 with digest docker.elastic.co/elasticsearch/elasticsearch@sha256:6ae227c688e05f7d487e0cfe08a5a3681f4d60d006ad9b5a1f72a741d6091df1 ...
Waiting for services to be up and running...
*** WARNING: Service runner-lyg4p7af-project-29830664-concurrent-0-d98cae38f203983b-elastic__elasticsearch-1 probably didn't start properly.
Health check error:
service "runner-lyg4p7af-project-29830664-concurrent-0-d98cae38f203983b-elastic__elasticsearch-1-wait-for-service" timeout
Health check container logs:
Service container logs:
*********