Docker es and ES cluster

Source: Internet
Author: User

How to use the This image

You can run the default elasticsearch command simply:

$ docker run -d elasticsearch

You can also pass in additional the flags to elasticsearch :

$ docker run -d elasticsearch elasticsearch -Des.node.name="TestNode"

This image comes with a default set of the configuration files elasticsearch for, and if want to provide your own set of Configura tion files, you can do that via a volume mounted at /usr/share/elasticsearch/config :

$ docker run -d -v "$PWD/config":/usr/share/elasticsearch/config elasticsearch

This image was configured with a volume at the /usr/share/elasticsearch/data persisted index data. Use this path if you would like to keep the data in a mounted volume:

$ docker run -d -v "$PWD/esdata":/usr/share/elasticsearch/data elasticsearch

This image includes EXPOSE 9200 9300 (default http.port ) container linking would make it automatically available to the Linke D containers.

elasticsearch_master:    image: elasticsearch:latest    command: "elasticsearch -Des.cluster.name=workagram -Des.node.master=true -Des.node.data=false"    environment:       - ES_HEAP_SIZE=512m    ports:      - "9200:9200"      - "9300:9300"elasticsearch1:    image: elasticsearch:latest    command: "elasticsearch -Des.cluster.name=workagram -Des.discovery.zen.ping.unicast.hosts=elasticsearch_master"    links:      - elasticsearch_master    volumes:      - "/opt/elasticsearch/data"    environment:       - ES_HEAP_SIZE=512melasticsearch2:    image: elasticsearch:latest    command: "elasticsearch -Des.cluster.name=workagram -Des.discovery.zen.ping.unicast.hosts=elasticsearch_master"    links:      - elasticsearch_master    volumes:      - "/opt/elasticsearch/data"    environment:       - ES_HEAP_SIZE=512m

Docker es and ES cluster

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.