准备docker-compose.yml文件,如下所示为启动一个单节点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