部署ElasticSearch5.6.16
docker pull elasticsearch:5.6.16
docker network create somenetwork
docker run -d --name es5 -e "discovery.type=single-node" elasticsearch:5.6.16
docker cp es5:/usr/share/elasticsearch/config /data2/es
docker stop es5
docker rm es5
docker run -d --name es5 --net somenetwork -p 9200:9200 -p 9300:9300 -v /data2/es/data:/usr/share/elasticsearch/data -v /data2/es/config/:/usr/share/elasticsearch/config -e "discovery.type=single-node" elasticsearch:5.6.16
部署kibana5.6.16
docker pull kibana:5.6.16
docker run -d --name kibana5 kibana:5.6.16
docker cp kibana5:/etc/kibana/kibana.yml /data2/kibana/
docker stop kibana5
docker rm kibana5
docker run -d --name kibana5 -p 5601:5601 -v /data2/kibana/kibana.yml:/etc/kibana/kibana.yml --net=somenetwork kibana:5.6.16
vi /data2/kibana/kibana.yml
elasticsearch.url: es的ip:9200
保存退出
重启kibana
docker restart kibana5