1

I've moved from the official version to the now deprecated docker hub version of elasticsearch version 5.5.2.

In the official version, the recommended way of setting the name of the cluster is to pass it as an environment variable - cluster.name=docker-cluster. This method does not work in the docker hub version. It uses the default name "elasticsearch" despite the environment variable.

Referring an earlier question, I experimented by overriding the command in the docker-compose file to command: [ "elasticsearch", "-Des.cluster.name=another-name" ] but this causes the container to not start at all.

Is there a way to override the cluster name without using a custom configuration file?

Vivek Kodira
  • 2,764
  • 4
  • 31
  • 49

1 Answers1

1

docker logs <container> on the restarting container displayed the correct syntax to use. The syntax that worked was command: ["elasticsearch", "-Ecluster.name=es-cluster"]

Vivek Kodira
  • 2,764
  • 4
  • 31
  • 49