How do I disable X-Pack security on the elasticsearch 5.2.2 docker image?

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

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 "" -e "" -e "" -v /data/sw/elasticsearch/data:/usr/share/elasticsearch/data

1 Like

It worked for me.

I just ran:

docker run -d -p 9200:9200 --name elasticsearch -e "" -e "" -e ""

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 "" -e ""

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.