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?

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.