Skip to content

Commit f8dbb11

Browse files
authored
Merge pull request elastic#723 from fxdgear/nick/better_start_es_script
better bash script to allow start from anywhere. closes elastic#721
2 parents 08e0bbe + 94ebf85 commit f8dbb11

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test_elasticsearch/start_elasticsearch.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
ES_VERSION=${ES_VERSION:-"6.1.3"}
66
ES_TEST_SERVER=${ES_TEST_SERVER:-"http://localhost:9200"}
77

8+
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9+
810
exec docker run -d \
911
-e path.repo=/tmp \
1012
-e "repositories.url.allowed_urls=http://*" \
1113
-e node.attr.testattr=test \
1214
-e ES_HOST=$ES_TEST_SERVER \
13-
-v `pwd`/../elasticsearch:/code/elasticsearch \
15+
-v $SOURCE_DIR/../elasticsearch:/code/elasticsearch \
1416
-v /tmp:/tmp \
1517
-p "9200:9200" \
1618
docker.elastic.co/elasticsearch/elasticsearch-oss:$ES_VERSION

0 commit comments

Comments
 (0)