Skip to content

DockerDemos/ElasticSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch Docker Image

Docker image for running an Elasticsearch instance.

Building and Running

  1. git clone https://github.com/DockerDemos/ElasticSearch

  2. cd ElasticSearch

  3. docker build -t elastic . <-- note the period on the end

  4. Start with:

    docker run -p 9200:9200
    -v <host_data_storage_path>:/var/lib/elasticsearch
    -e ELASTIC_CONFIG_NETWORK_HOST=


    --name elastic
    -d elastic

The "host_data_storage_path" is the directory on the host in which you will store the persistent data. The "ELASTIC_CONFIG_NETWORK_HOST" variable is the address you want ElasticSearch to listen for connections on (usually 0.0.0.0, or 127.0.0.1, depending on if it will be a stand-alone, or linked container instance). The ELASTIC_CONFIG_NETWORK_HOST will default to 127.0.0.1 if nothing is specified.

You now have an Elasticsearch instance running, listening on port 9200.

Testing

Put some info in:

curl -XPUT 'http://localhost:9200/twitter/user/kimchy' -d '{ "name" : "Shay Banon" }'

Get it back out:

curl -XGET 'http://localhost:9200/twitter/user/kimchy?pretty=true'

About

Docker image for running an ElasticSearch instance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages