一、從官網上拉取 elasticsearch 的鏡像node
docker pull elasticsearch:5.6.11
docker images
二、運行容器docker
mkdir -p /opt/elasticsearch/config mkdir -p /opt/elasticsearch/data echo "http.host: 0.0.0.0" >> /opt/elasticsearch/config/elasticsearch.yml docker run --name elasticsearch5.6.11 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -v /opt/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v /opt/elasticsearch/data:/usr/share/elasticsearch/data -d 362c5cb1669b
三、檢查elasticsearch是否啓動成功curl
curl 127.0.0.1:9200
一、從官網上拉取鏡像elasticsearch
docker pull kibana:5.6.11 docker images
二、運行容器url
docker run --name kibana5.6.11 -e ELASTICSEARCH_URL=http://192.168.1.1:9200 -p 5601:5601 -d 388661dcd03e
三、訪問 http://192.168.1.1:5601spa