Docker ELK-Stack Container - Logstash
maintained by MarvAmBass
What is it
This Dockerfile (available as marvambass/logstash) gives you a ready to use Logstash Container for your ELK stack or something else.
View in Docker Registry marvambass/logstash
View in GitHub MarvAmBass/docker-logstash
Environment variables and defaults
- default: the current ip of the docker container itself
- you should set this to the ip you want to connect to your logstash server
- default: logstash
- you should set this to the common name of your logstash server
Those are the two files needed to connect your logstash forwarder to logstash securly. They'll be generated if they don't exist - but you can create your own and put them there.
Running marvambass/logstash Container
First of all you could start my elasticsearch container (Kibana needs a Elasticsearch instance to work) like this:
docker run -d \ --name elasticsearch \ -v "$PWD/esdata":/usr/share/elasticsearch/data marvambass/elasticsearch
Now the Logstash Container:
docker run -d \ --name logstash \ --link elasticsearch:elasticsearch \ -v "$PWD/conf:/conf" \ -v "$PWD/certs:/certs" \ -v "$PWD/patterns:/patterns" \ marvambass/logstash
we create a new container and link it tou our elasticsearch instance by the name elasticsearch, we also overwrite the /conf directory with our own configuration directory and the /certs_ directory to use our certs.
This Dockerfile is based on my marvambass/oracle-java8 Image.