This image comes bundled with X-Pack security. I see a question about an image without X-Pack. But I am also ok with a way to disable it in the docker image. I am aware of how to disable it in the elasticsearch.yml file but I need to be able to disable it when I start the elasticsearch docker container. Any ideas?
You probably want to read https://www.elastic.co/guide/en/x-pack/5.2/installing-xpack.html#xpack-enabling
Thanks. I tried doing that with the following command. But it did not take effect. How should I be disabling it on the docker image?
docker run -d -p 9200:9200 --name elasticsearch -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "xpack.security.enabled=false" -v /data/sw/elasticsearch/data:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:5.2.2
It worked for me.
I just ran:
docker run -d -p 9200:9200 --name elasticsearch -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:5.2.2
curl 127.0.0.1:9200
And got:
{
"name" : "NA9O7g6",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "4c9iUQZSTN2XlRb_7wnY4g",
"version" : {
"number" : "5.2.2",
"build_hash" : "f9d9b74",
"build_date" : "2017-02-24T17:26:45.835Z",
"build_snapshot" : false,
"lucene_version" : "6.4.1"
},
"tagline" : "You Know, for Search"
}
Thanks for trying it out. I have been struggling with it for the last couple of days. Are you sure you have x-pack security turned on in your image? What happens when you run the following docker command?
docker run -d -p 9200:9200 --name elasticsearch -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.2.2
Never mind. It worked for me this time. All this time, I was passing the -u elastic parameter along with the curl command and that was prompting me for the password and not the x-pack security. Thanks a bunch for your prompt response.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.