Running Elasticsearch with discovery.type=single-node in docker with ES_SETTING_

Viewed 908

I'm trying to run ES in docker, with discovery.type=single-node, but my hosting provider prohibits . characters in env variable names.

This is discussed here: https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods

With the instructions to convert the setting name as follows:

    Change the setting name to uppercase
    Prefix it with ES_SETTING_
    Escape any underscores (_) by duplicating them
    Convert all periods (.) to underscores (_)

So, I think it should become ES_SETTING_DISCOVERY_TYPE=single-node

This works on my laptop:

docker run -e "discovery.type=single-node" -p 9200:9200 elasticsearch:7.14.0

This fails:

docker run -e "ES_SETTING_DISCOVERY_TYPE=single-node" -p 9200:9200 elasticsearch:7.14.0

Any suggestions? ("Get another hosting provider" is valid, but more work than fixing a setting, if it can be fixed).

1 Answers

Apparently my issue was the source is slightly ahead of the docker image.

The change I was trying to use was checked in yesterday and is not present yet in the official docker images.

Related