I want to set environment variable for network.publish_host in docker-compose.yml file .
Here i am not able to set network.publish_host in docker-compose.yml file In my example i am running a elasticsearch cluster in separate docker hosts.But when i tried to set network.publish_host in environment iam not able to set .It takes default value as 172.18.0.2 but my expectation was to get something like 192.168.1.22
Here is my docker-compose.yml file
version: '2'
services:
elasticsearch1:
image: bitnami/elasticsearch:latest
environment:
- ELASTICSEARCH_CLUSTER_NAME=docker-cluster
- network.publish_host=192.168.1.22
- discovery.zen.ping.multicast.enabled=false
- ELASTICSEARCH_CLUSTER_HOSTS=192.168.1.23
- discovery.zen.ping.timeout=3s
- ELASTICSEARCH_NODE_NAME=elastic-node1
volumes:
- ~/elasticsearch/data:/bitnami
ports:
- '9200:9200'
- '9300:9300'
Please help me to solve this issue
I want to set environment variable for network.publish_host in docker-compose.yml file .
Here i am not able to set network.publish_host in docker-compose.yml file In my example i am running a elasticsearch cluster in separate docker hosts.But when i tried to set network.publish_host in environment iam not able to set .It takes default value as 172.18.0.2 but my expectation was to get something like 192.168.1.22
Here is my docker-compose.yml file
Please help me to solve this issue