I create a container with ubuntu's image.
That's all right, and i can use very well.
So, i install a elasticsearch service in this ubuntu's docker.
I have a ubuntu docker. I install elasticsearch service it.
When i use the command "curl -X GET 'localhost:9200' ", it return me the version, the name, all right.
It means the elasticsearch is configured correct, but when i access on my browser out of docker , doesn't work.
I have already configured the network on elasticsearch.yml file in path: /etc/elasticsearch/elasticsearch.yml
I can access the service with:
curl -X GET 'localhost:9200' and run correct, but when i try to access out of container , i can't found the page.
I try to use the command:
docker run -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" ubuntu/elastic
But doesn't work.
Copyright Notice:Content Author:「Rods Freitas」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/44607098/docker-ubuntu-elasticsearch