docker 运行ELK
docker network create somenetwork
docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.1.1
docker run -it -d -p 5044:5044 --name logstash --net somenetwork -v /docker/logstash/logstash.yml:/usr/share/logstash/config/logstash.yml -v /docker/conf.d/:/usr/share/logstash/conf.d/ logstash:7.1.1
docker run -it -d -p 5044:5044 --name logstash --net somenetwork -v /docker/logstash/logstash.yml:/usr/share/logstash/config/logstash.yml -v /docker/conf.d/:/usr/share/logstash/conf.d/ logstash:7.1.1
docker run -it -d -p 5044:5044 --name logstash --net somenetwork -v /docker/logstash/:/usr/share/logstash/config/ -v /docker/conf.d/:/usr/share/logstash/conf.d/ logstash:7.1.1
docker run -it -d -p 5044:5044 --name logstash --net somenetwork -v /docker/logstash/:/usr/share/logstash/config/ -v /docker/conf.d/:/usr/share/logstash/conf.d/ logstash:7.1.1
docker run --name filebeat --user=root -d --net somenetwork --privileged=true --volume="/docker/nginx/:/var/log/nginx/" --volume="/docker/filebeat/filebeat.docker.yml:/usr/share/filebeat/filebeat.yml:ro" --volume="/var/lib/docker/containers:/var/lib/docker/containers:ro" --volume="/var/run/docker.sock:/var/run/docker.sock:ro" store/elastic/filebeat:7.1.1
docker run --name kibana -d --net somenetwork -p 5601:5601 kibana:7.1.1
docker run -it -d --user=root --privileged=true -p 5044:5044 -p 9600:9600 --name logstash --net somenetwork -v /docker/logstash/:/usr/share/logstash/config/ -v /docker/conf.d/:/usr/share/logstash/conf.d/ logstash:7.1.1
![微信公众号](https://files.cnblogs.com/files/Hackerman/%E9%BB%98%E8%AE%A4%E6%A0%87%E9%A2%98_%E6%A8%AA%E7%89%88%E4%BA%8C%E7%BB%B4%E7%A0%81_2020.gif)
出处:http://www.cnblogs.com/Hackerman/