1.elasticsearch
docker run -e "ES_JAVA_OPTS=-Xms256m -Xmx256m" \ --name elasticsearch -p 9200:9200 -p 9300:9300 \ -e "discovery.type=single-node" \ -v /usr/share/elasticsearch/config:/usr/share/elasticsearch/config \ -d elasticsearch:7.8.0
报错示例: docker启动elasticsearch异常Exception in thread "main" java.nio.file.NoSuchFileException: /usr/share/elasticsearch/config/jvm.options |
1.将容器中文件拷出到宿主机挂载卷文件夹下 docker cp [容器ID]:容器文件路径 要拷贝的宿主机路径 例如我的: docker cp 2a202fa:/usr/share/elasticsearch/plugins/ ./es/es-with-ik-plugins/
2.开启挂载卷配置,重新启动elasticsearch |
浏览器输入 http://localhost:9200/ 或者终端输入 curl http://localhost:9200/ 来检查es是否安装成功
2.kibana
docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana:7.8.0
浏览器输入地址 http://localhost:5601/, 启动成功
标签:9200,share,kibana,elasticsearch,usr,docker From: https://www.cnblogs.com/alamZ/p/18189268