Skip to content

odedlaz/docker-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch Dockerfile

This repository contains Dockerfile of Elasticsearch for Docker's automated build.

Base Docker Image

Installation

  1. Install Docker.

  2. Download automated build from public Docker Hub Registry: docker pull sxoded/elasticsearch

this method will install the head plugin only. alternatively, you can build an image from Dockerfile: docker build -t="sxoded/elasticsearch" github.com/sxoded/elasticsearch)

if you want to build the image with more plugins - add them to the plugins file.

Usage

docker run -d -p 9200:9200 -p 9300:9300 sxoded/elasticsearch

Attach persistent/shared directories

  1. Create a mountable data directory <data-dir> on the host.

  2. Create Elasticsearch config file at <data-dir>/elasticsearch.yml.

```yml
path:
  logs: /data/log
  data: /data/data
```
  1. Start a container by mounting data directory and specifying the custom configuration file:
```sh
docker run -d -p 9200:9200 -p 9300:9300 -v <data-dir>:/data sxoded/elasticsearch /elasticsearch/bin/elasticsearch -Des.config=/data/elasticsearch.yml
```

After few seconds, open http://<host>:9200 to see the result.

About

elasticsearch docker container with plugins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages