準備docker-compose.yml文件诸衔,如下所示為啟動一個單節(jié)點Elasticsearch集群和Kibana面板:
version: "2.2"
services:
elasticsearch:
image: elasticsearch:7.4.2
ports:
- "9200:9200"
- "9300:9300"
networks:
- elastic
environment:
- "discovery.type=single-node"
kibana:
image: kibana:7.4.2
ports:
- "5601:5601"
depends_on:
- elasticsearch
networks:
- elastic
networks:
elastic:
driver: bridge
運行
docker-compose up -d
訪問 http://localhost:5601/ 即可看到Kibana面板。
參考鏈接:
Install Elasticsearch with Docker | Elasticsearch Reference [7.4] | Elastic