I am running a docker in my ubuntu host with the following:
docker run -d --rm -p 9200:9200 -p 9300:9300 --name elasticsearch6.6.1 docker.elastic.co/elasticsearch/elasticsearch:6.6.1
Later on when I query like so, I get failure:
curl 'http://localhost:9200/?pretty'
The failure looks like so:
curl 'http://localhost:9200/?pretty'
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/dcac22e9-6b6f-443b-8497-c093dd6bb804.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (56) Recv failure: Connection reset by peer
So, my question is:
How do I start elasticsearch on docker and publish the ports 9200 and 9300 to the host?
Is network.host=_ site _ setting required?
Thanks,
docker logs elasticsearch6.6.1
or are you sure that it properly set up? – ttomalak