title: Elasticsearch cluster with docker compose in Windows
body: <p>I am using <em>Docker 17.04.0-ce</em> and <em>Compose 1.12.0</em> in <em>Windows</em>.</p>
  
  <p>I want to create a cluster of 3 <em>Elasticsearch</em> nodes (all on the same IP but on different ports). I use the image: <em>docker.elastic.co/elasticsearch/elasticsearch:5.4.0</em></p>
  
  <p>When I compose the following yml and check the status in <em>Cerebro</em>, I see that no cluster is actually formed (each node does not see the others). 
  Any ideas what the problem could be?</p>
  
  <pre><code>version: '2'
  
  services:
  
    elasticsearch:
      image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
      container_name: es_1
      ports:
        - "9200:9200"
        - "9300:9300"
      environment:
        - cluster.name=cp-es-cluster
        - node.name=cloud1
        - http.cors.enabled=true
        - http.cors.allow-origin="*"
        - network.host=0.0.0.0
        - discovery.type=zen
        - network.publish_host=192.168.99.100
        - discovery.zen.minimum_master_nodes=1
        - xpack.security.enabled=false
        - xpack.monitoring.enabled=false
        - "ES_JAVA_OPTS=-Xms1g -Xmx1g -XX:-AssumeMP"
      networks:
        - docker_elk
  
    elasticsearch_2:
      image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
      container_name: es_2
      ports:
        - "9201:9200"
        - "9301:9300"
      links:
        - elasticsearch
      environment:
        - cluster.name=cp-es-cluster
        - node.name=cloud2
        - http.cors.enabled=true
        - http.cors.allow-origin="*"
        - network.host=0.0.0.0
        - discovery.type=zen
        - "discovery.zen.ping.unicast.hosts=192.168.99.100:9200"
        - network.publish_host=192.168.99.100
        - discovery.zen.minimum_master_nodes=1
        - xpack.security.enabled=false
        - xpack.monitoring.enabled=false
        - "ES_JAVA_OPTS=-Xms1g -Xmx1g -XX:-AssumeMP"
      networks:
        - docker_elk
  
    elasticsearch_3:
      image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
      container_name: es_3
      ports:
        - "9202:9200"
        - "9302:9300"
      links:
        - elasticsearch
      environment:
        - cluster.name=cp-es-cluster
        - node.name=cloud3
        - http.cors.enabled=true
        - http.cors.allow-origin="*"
        - network.host=0.0.0.0
        - discovery.type=zen
        - "discovery.zen.ping.unicast.hosts=192.168.99.100:9200"
        - network.publish_host=192.168.99.100
        - discovery.zen.minimum_master_nodes=1
        - xpack.security.enabled=false
        - xpack.monitoring.enabled=false
        - "ES_JAVA_OPTS=-Xms1g -Xmx1g -XX:-AssumeMP"
      networks:
        - docker_elk
  
    cerebro:
      image: yannart/cerebro:0.6.5
      container_name: cerebro
      networks:
        - docker_elk
      ports:
        - "9000:9000"
      depends_on:
        - elasticsearch
  
  networks:
    docker_elk:
      driver: bridge
  </code></pre>