docker pull rednut/elasticsearch:latest
docker run -d -p 9200:9200 -p 9300:9300 dockerfile/elasticsearch
Create a mountable data directory <data-dir> on the host.
Create ElasticSearch config file at <data-dir>/elasticsearch.yml.
```yml
path:
logs: /data/log
data: /data/data
```
3. 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.
Content type
Image
Digest
sha256:bd5d6b6d9…
Size
341.8 MB
Last updated
almost 11 years ago
docker pull rednut/elasticsearch