Elasticsearch + Kibana
docker run -p 9200:9200 -p 9300:9300 --name elasticsearch \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx512m" \
-d elasticsearch:7.17.7
docker exec -it elasticsearch /bin/bash
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.17.7/elasticsearch-analysis-ik-7.17.7.zip
docker restart elasticsearch
docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana:7.17.7
其中服务器可能因为网络原因下载不下来 ik 分词器,我们下载后本地导入安装
# ik 分词器在服务器中的位置 /root/elasticsearch-analysis-ik-7.17.7.zip# 导入 docker 中
docker cp /root/elasticsearch-analysis-ik-7.17.7.zip elasticsearch:/tmp/elasticsearch-analysis-ik-7.17.7.zip
# 进入容器
docker exec -it elasticsearch /bin/bash
# 安装
./bin/elasticsearch-plugin install file:///tmp/elasticsearch-analysis-ik-7.17.7.zip
License:
CC BY 4.0