Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

AlayaCare/elasticsearch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

ElasticSearch Dockerfile

This repository contains Dockerfile of ElasticSearch for Docker's trusted build published to the public Docker Registry.

Dependencies

Installation

  1. Install Docker.

  2. Download trusted build from public Docker Registry: docker pull dockerfile/elasticsearch

    (alternatively, you can build an image from Dockerfile: docker build -t="dockerfile/elasticsearch" github.com/dockerfile/elasticsearch)

Usage

docker run -d -p 9200:9200 -p 9300:9300 dockerfile/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 dockerfile/elasticsearch /elasticsearch/bin/elasticsearch -Des.config=/data/elasticsearch.yml
```

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

Releases

No releases published

Packages

No packages published