Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Readme #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ This repository contains **Dockerfile** of [Elasticsearch](http://www.elasticsea

1. Install [Docker](https://www.docker.com/).

2. Download [automated build](https://registry.hub.docker.com/u/dockerfile/elasticsearch/) from public [Docker Hub Registry](https://registry.hub.docker.com/): `docker pull dockerfile/elasticsearch`
2. Download [automated build](https://registry.hub.docker.com/u/dockerfile/elasticsearch/) from public [Docker Hub Registry](https://registry.hub.docker.com/): `docker pull 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
docker run -d -p 9200:9200 -p 9300:9300 elasticsearch

#### Attach persistent/shared directories

1. Create a mountable data directory `<data-dir>` on the host.
1. Create a mountable data directory `<data-dir>` on the host and make sure it has proper permissions (chmod 777 <data-dir>).

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

Expand All @@ -37,7 +37,7 @@ This repository contains **Dockerfile** of [Elasticsearch](http://www.elasticsea
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
docker run -d -p 9200:9200 -p 9300:9300 -v <data-dir>:/data elasticsearch elasticsearch -Des.config=/data/elasticsearch.yml
```

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