Sign inSign up

phenompeople/elasticsearch

By phenompeople

•Updated over 1 year ago

Elasticsearch is a powerful open source search and analytics engine that makes data easy to explore.

Image
1

5M+

phenompeople/elasticsearch repository overview

dockeri.co License

⁠elasticsearch

Dockerfiles for building Centos based elasticsearch images.

⁠phenompeople/elasticsearch

⁠Elasticsearch containers as a cluster without docker-compose

Since Elasticsearch runs inside a contianer we have to make following changes

  1. Docker networking hides the containers from the networking stack on the host machine. The problem is when you start elasticsearch, you have to host addresses. Either we have to publish all ports or update elasticsearch.yml with below settings, and define PUBLISH_IP as an environment variable.

    network.bind_host: 0.0.0.0
    network.publish_host: "${PUBLISH_IP}"
    
  2. Create/update sysctl configurations and Docker startup options to fix max_file_descriptions error during elasticsearch start up. /etc/sysconfig/docker with below values

    DAEMON_MAXFILES=1048576
    OPTIONS="--default-ulimit nofile=1024:65536"
    DAEMON_PIDFILE_TIMEOUT=10
    
  3. Create/update sysctl.d limits on host machine and update sysctl to reflect immediately

    vm.max_map_count=262144
    fs.file-max=100000
    
  4. Please define below variables during run time to replace default values, variables defined during run time will take the highest priority, each variable should be passed differently with option -e

Attribute nameDefault Value
ES_JAVA_OPTS-Xms2g -Xmx2g

⁠Pre-Requisites

⁠How to use this image

  1. This image can be used by simply running as a standalone elasticsearch host

$ docker run --name=elasticsearch -p 9200:9200 -v /etc/elasticsearch:/usr/local/elasticsearch/config -td phenompeople/elasticsearch

Above command runs elasticsearch container with port 9200 mapped to host and reading configuration files mapped under /etc/elasticsearch.

  1. In a multi node elasticsearch cluster, to make nodes to communicate each other publish 9300 also in-addition to above command

$ docker run --name=elasticsearch -p 9200:9200 -p 9300:9300 -v /etc/elasticsearch:/usr/local/elasticsearch/config -td phenompeople/elasticsearch

  1. To make image run even after reboot use extra option --restart=always

$ docker run --restart=always --name=elasticsearch --name=elasticsearch -p 9200:9200 -p 9300:9300 -v /etc/elasticsearch:/usr/local/elasticsearch/config -td phenompeople/elasticsearch

⁠Maintainers

⁠License and Authors

License: Apache License

Author : Phenompeople Pvt Ltd ([email protected]⁠)

Tag summary

Content type

Image

Digest

sha256:2779613d5…

Size

1.3 GB

Last updated

over 1 year ago

docker pull phenompeople/elasticsearch:8.17.3