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
出处:http://www.cnblogs.com/Hackerman/