JEFFREY

feiworks.com

Docker & Elasticsearch

docker pull elasticsearch:6.5.0

docker run -d \
--name es \
-p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms1600m -Xmx1600m" \
elasticsearch:6.5.0

docker exec -it es /bin/bash
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.5.0/elasticsearch-analysis-ik-6.5.0.zip

docker cp es:/usr/share/elasticsearch/config /data/es
docker cp es:/usr/share/elasticsearch/data /data/es
docker cp es:/usr/share/elasticsearch/plugins /data/es

elasticsearch.yml config:
node.name: master
http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: 0.0.0.0

docker run -d \
--name es \
-p 9200:9200 -p 9300:9300 \
-v /data/es/config:/usr/share/elasticsearch/config \
-v /data/es/data:/usr/share/elasticsearch/data \
-v /data/es/plugins:/usr/share/elasticsearch/plugins \
elasticsearch:6.5.0

Powered By Z-BlogPHP 1.5 Zero

Copyright @ 2014-2019 All Rights Reserved.
feiworks.com