# Cant pass the name of my cluster using docker

**URL:** <https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024>\
**Category:** Elasticsearch\
**Created:** [May 17, 2017, 12:48am UTC](https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024 "2017-05-17T00:48:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tadeu\_Bernacchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tadeu_bernacchi/32/18285_2.png) [@Tadeu\_Bernacchi](https://discuss.elastic.co/u/Tadeu_Bernacchi)\
**Post date:** [May 17, 2017, 12:48am UTC](https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024/1 "2017-05-17T00:48:02Z")

</div>

Hello guys,

I'm new with elastic and i'm trying to bring up an environment using Elastic and Docker to set up a Graylog Server, but when i try to pass the name of my cluster i got stuck:

**[root@notebook docker]# docker run -d --name=elastic 08794661d6b0 -e "cluster.name=graylog"**  
2a011103b6b71304ee5f960e5d7165032c08e8684ff6bc51ed001bb38efef728  
docker: Error response from daemon: oci runtime error: container\_linux.go:247: starting container process caused "exec: "-e": executable file not found in $PATH".

(The image 08794661d6b0 is [docker.elastic.co/elasticsearch/elasticsearch](http://docker.elastic.co/elasticsearch/elasticsearch) 5.4.0)

Any help it will be appreciate!

Thanks!

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [May 18, 2017, 7:41am UTC](https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024/2 "2017-05-18T07:41:53Z")

</div>

```
$ docker run --help

Usage:	docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

```

The option needs to be passed before the image. In your example it assumes `-e` is the command. Try `docker run -d --name=elastic -e "cluster.name=graylog" 08794661d6b0` 🙂

---

<div class="post-metadata">

**Author:** ![Tadeu\_Bernacchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tadeu_bernacchi/32/18285_2.png) [@Tadeu\_Bernacchi](https://discuss.elastic.co/u/Tadeu_Bernacchi)\
**Post date:** [May 18, 2017, 1:31pm UTC](https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024/3 "2017-05-18T13:31:45Z")

</div>

Thanks,

It was my bad, i'm still learning, thanks again!

---

<div class="post-metadata">

**Author:** ![Tadeu\_Bernacchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tadeu_bernacchi/32/18285_2.png) [@Tadeu\_Bernacchi](https://discuss.elastic.co/u/Tadeu_Bernacchi)\
**Post date:** [May 18, 2017, 1:56pm UTC](https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024/4 "2017-05-18T13:56:02Z")

</div>

Hello again guys,

I'm run another container:

**[root@notebook docker]# docker run -it --name=elastic -e "cluster.name=graylog" 08794661d6b0 /bin/bash**

and i went to check the elasticsearch.yml and i got this:

\*\*[elasticsearch@e5710541152b config]$ cat elasticsearch.yml \*\*  
**[cluster.name](http://cluster.name): "docker-cluster"**

Is it normal? What am i doing wrong??

Thanks again!

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [May 21, 2017, 9:26pm UTC](https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024/5 "2017-05-21T21:26:00Z")

</div>

Yeah, that's the default setting from [https://github.com/elastic/elasticsearch-docker/blob/master/build/elasticsearch/elasticsearch.yml#L1](https://github.com/elastic/elasticsearch-docker/blob/master/build/elasticsearch/elasticsearch.yml#L1)

But with your environment variable you are correctly overriding it — mentioned in the docs as well: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#\_a\_present\_the\_parameters\_via\_docker\_environment\_variables](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_a_present_the_parameters_via_docker_environment_variables)

Check the cluster name with curl against localhost:9200/

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 18, 2017, 9:26pm UTC](https://discuss.elastic.co/t/cant-pass-the-name-of-my-cluster-using-docker/86024/6 "2017-06-18T21:26:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
