1、拉取镜像
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.15.0
docker pull docker.elastic.co/kibana/kibana:7.15.0
docker pull docker.elastic.co/logstash/logstash:7.15.0
2、配置文件(解压资源到D盘DOCKER目录下)
2.1 配置文件保存到 D\DOCKER 目录下
2.2 修改logstash中的数据库配置、ES地址
2.3 修改kibana中的ES配置
3、启动容器
docker run -d --name elasticsearch -v D:\DOCKER\elasticsearch\config\:/usr/share/elasticsearch/config -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.15.0
docker run -d --name kibana -p 5601:5601 -v D:\DOCKER\kibana\config\:/usr/share/kibana/config -v D:\DOCKER\kibana\translations\:/usr/share/kibana/translations -e "ELASTICSEARCH_HOSTS=http://192.168.34.131:9200" docker.elastic.co/kibana/kibana:7.15.0
docker run -d --name logstash -p 5044:5044 -p 9600:9600 -v D:\DOCKER\logstash\data\:/usr/share/logstash/data -v D:\DOCKER\logstash\path\to\mysql-connector-j-8.0.33.jar:/usr/share/logstash/mysql-connector-j-8.0.33.jar -v D:\DOCKER\logstash\config\:/usr/share/logstash/config -v D:\DOCKER\logstash\pipeline\:/usr/share/logstash/pipeline -e "ELASTICSEARCH_HOSTS=http://192.168.34.131:9200" docker.elastic.co/logstash/logstash:7.15.0