I created a image for elasticsearch & running the image as
docker run -it -v elasticsearch_data:/usr/src/elastic/elasticsearch-2.3.4/data -v elasticsearch_logs:/usr/src/elastic/elasticsearch-2.3.4/logs -p 9200:9200 -p 9300:9300 --net=host --memory="4g" -e ES_HEAP_SIZE=2g telednacomm/elastic
Its working fine. But I want to run this image through docker-compose. For that
version: '2' services: node: image: telednacomm/nodepm2 ports: - "3000:3000" elastic: image: telednacomm/elastic volumes: - elasticsearch_data:/usr/src/elastic/elasticsearch-2.3.4/data - elasticsearch_logs:/usr/src/elastic/elasticsearch-2.3.4/logs ports: - "9200:9200" - "9300:9300"
I written like this. But how to mention --net=host
and --memory="4g"
these flags inside the compose file. Or any other way to do this???