{"action":"created","issue":{"url":"https://api.github.com/repos/docker-library/elasticsearch/issues/68","labels_url":"https://api.github.com/repos/docker-library/elasticsearch/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/elasticsearch/issues/68/comments","events_url":"https://api.github.com/repos/docker-library/elasticsearch/issues/68/events","html_url":"https://github.com/docker-library/elasticsearch/issues/68","id":115077788,"number":68,"title":"Cannot set up an elasticsearch:2 cluster in docker any more","user":{"login":"arnonymous","id":5188753,"avatar_url":"https://avatars.githubusercontent.com/u/5188753?v=3","gravatar_id":"","url":"https://api.github.com/users/arnonymous","html_url":"https://github.com/arnonymous","followers_url":"https://api.github.com/users/arnonymous/followers","following_url":"https://api.github.com/users/arnonymous/following{/other_user}","gists_url":"https://api.github.com/users/arnonymous/gists{/gist_id}","starred_url":"https://api.github.com/users/arnonymous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnonymous/subscriptions","organizations_url":"https://api.github.com/users/arnonymous/orgs","repos_url":"https://api.github.com/users/arnonymous/repos","events_url":"https://api.github.com/users/arnonymous/events{/privacy}","received_events_url":"https://api.github.com/users/arnonymous/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-04T15:26:25Z","updated_at":"2015-11-09T17:19:37Z","closed_at":null,"body":"Hi all,\r\n\r\nBefore the v2, I used to set up my elasticsearch cluster in docker like this:\r\n> docker run --name myes --restart=always -p 9200:9200 -p 9300:9300  -d elasticsearch\r\n> docker run --name myes2 --restart=always -p 9201:9200 -p 9301:9300  -d elasticsearch\r\n\r\nBut with the v2, since I need to use the `--network.host _non_loopback_` option, my elasticsearch instances are not able to \"zen\" discover themselves anymore.\r\n\r\nI also tried with the ` -Des.network.bind_host=0.0.0.0` option but with no more success.\r\n\r\nMy version of docker is 1.5.0 and everything run in a vagrant of ubuntu-vivid64.\r\n\r\nAny advice would be appreciated.\r\nArnaud"},"comment":{"url":"https://api.github.com/repos/docker-library/elasticsearch/issues/comments/155130227","html_url":"https://github.com/docker-library/elasticsearch/issues/68#issuecomment-155130227","issue_url":"https://api.github.com/repos/docker-library/elasticsearch/issues/68","id":155130227,"user":{"login":"patrickmslatteryvt","id":5231477,"avatar_url":"https://avatars.githubusercontent.com/u/5231477?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickmslatteryvt","html_url":"https://github.com/patrickmslatteryvt","followers_url":"https://api.github.com/users/patrickmslatteryvt/followers","following_url":"https://api.github.com/users/patrickmslatteryvt/following{/other_user}","gists_url":"https://api.github.com/users/patrickmslatteryvt/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickmslatteryvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickmslatteryvt/subscriptions","organizations_url":"https://api.github.com/users/patrickmslatteryvt/orgs","repos_url":"https://api.github.com/users/patrickmslatteryvt/repos","events_url":"https://api.github.com/users/patrickmslatteryvt/events{/privacy}","received_events_url":"https://api.github.com/users/patrickmslatteryvt/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T17:19:37Z","updated_at":"2015-11-09T17:19:37Z","body":"This is rough and ready but it works:\r\n\r\n/usr/bin/docker run \\\r\n  --rm \\\r\n  --volume=\"/etc/localtime:/etc/localtime:ro\"\\\r\n  --volume=\"/ELK.data/elastic/data:/usr/share/elasticsearch/data:rw\" \\\r\n  --volume=\"/ELK/elastic/config/data.yaml:/usr/share/elasticsearch/config/elasticsearch.yml:ro\" \\\r\n  --name=\"elastic_1\" \\\r\n  --env=\"ES_HEAP_SIZE=1g\" \\\r\n  elasticsearch:2.0.0 \\\r\n  -Des.node.name=\"elastic_1\" -Des.network.host=_eth0:ipv4_\r\n\r\n/usr/bin/docker run \\\r\n  --rm \\\r\n  --volume=\"/etc/localtime:/etc/localtime:ro\"\\\r\n  --volume=\"/ELK.data/elastic/data:/usr/share/elasticsearch/data:rw\" \\\r\n  --volume=\"/ELK/elastic/config/data.yaml:/usr/share/elasticsearch/config/elasticsearch.yml:ro\" \\\r\n  --name=\"elastic_2\" \\\r\n  --env=\"ES_HEAP_SIZE=1g\" \\\r\n  elasticsearch:2.0.0 \\\r\n  -Des.node.name=\"elastic_2\" -Des.network.host=_eth0:ipv4_\r\n\r\n/usr/bin/docker run \\\r\n  --rm \\\r\n  --volume=\"/etc/localtime:/etc/localtime:ro\"\\\r\n  --volume=\"/ELK.data/elastic/data:/usr/share/elasticsearch/data:rw\" \\\r\n  --volume=\"/ELK/elastic/config/data.yaml:/usr/share/elasticsearch/config/elasticsearch.yml:ro\" \\\r\n  --name=\"elastic_3\" \\\r\n  --env=\"ES_HEAP_SIZE=1g\" \\\r\n  elasticsearch:2.0.0 \\\r\n  -Des.node.name=\"elastic_3\" -Des.network.host=_eth0:ipv4_\r\n\r\nELASTIC_1=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' elastic_1)\r\nELASTIC_2=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' elastic_2)\r\nELASTIC_3=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' elastic_3)\r\nUNICAST_HOSTS=\"${ELASTIC_1}:9300, ${ELASTIC_2}:9300, ${ELASTIC_3}:9300\"\r\n\r\n/usr/bin/docker run \\\r\n  --volume=\"/etc/localtime:/etc/localtime:ro\"\\\r\n  --volume=\"/ELK.data/elastic/data:/usr/share/elasticsearch/data:rw\" \\\r\n  --volume=\"/ELK/elastic/config/master.yaml:/usr/share/elasticsearch/config/elasticsearch.yml:ro\" \\\r\n  --name=\"elastic_master\" \\\r\n  elasticsearch:2.0.0 \\\r\n  -Des.node.name=\"elastic_master\" -Des.network.host=_eth0:ipv4_ -Des.discovery.zen.ping.unicast.hosts=\"${UNICAST_HOSTS}\"\r\n\r\nThe idea came from:\r\nhttps://gist.github.com/digital-wonderland/e0bd8e0d4c91a7fec2c7"}}