# Multiple Elasticsearch nodes with Docker

**URL:** <https://discuss.elastic.co/t/multiple-elasticsearch-nodes-with-docker/132875>\
**Category:** Elasticsearch\
**Created:** [May 22, 2018, 6:39pm UTC](https://discuss.elastic.co/t/multiple-elasticsearch-nodes-with-docker/132875 "2018-05-22T18:39:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandonmcgr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonmcgr/32/28789_2.png) [@Brandonmcgr](https://discuss.elastic.co/u/Brandonmcgr)\
**Post date:** [May 22, 2018, 6:39pm UTC](https://discuss.elastic.co/t/multiple-elasticsearch-nodes-with-docker/132875/1 "2018-05-22T18:39:00Z")

</div>

Hello guys,

I'm new to Docker and I'm having an issue.

I am trying to run a multinode set up with the following commands:

```
docker run -d --name elasticsearch -p 9200:9200 elasticsearch
docker run -d --name elasticsearch1 --link elasticsearch -e UNICAST_HOSTS=elasticsearch elasticsearch

```

Here is the output from the `docker ps` command.

```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c94a69a03471 elasticsearch "/docker-entrypoint.…" 6 minutes ago Up 6 minutes 9200/tcp, 9300/tcp elasticsearch1
9a02a100c756 elasticsearch "/docker-entrypoint.…" 9 minutes ago Up 9 minutes 0.0.0.0:9200->9200/tcp, 9300/tcp elasticsearch

```

Finally, here is the output from `curl ip:9200/_cluster/health?pretty`

```
{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}

```

I've spent a while trying to do this various ways and the nodes always run, but not in a cluster. Any ideas?

Thanks!

---

<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 19, 2018, 6:45pm UTC](https://discuss.elastic.co/t/multiple-elasticsearch-nodes-with-docker/132875/3 "2018-06-19T18:45:02Z")

</div>

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