logstash-forwarder Docker image.
Here you will find a Dockerfile for assembling a
logstash-forwarder container that communicates with
logstash server over secure Lumberjack protocol. This could be the base for all your Docker images that need
runit will make sure that your service runs on container start-up and supervises it. In case the service dies,
runit brings it back to life.
The image is available at quay.io/pires.
runitis installed from
logstash-forwarderbinary is available in
binariesfolder. Script to build said binary is also included.
- Docker 1.6.2 or newer
- User account with permissions to run Docker client
docker run --rm \ --volume /path/to/config:/logstash-forwarder/config \ --volume /path/to/certs:/logstash-forwarder/certs \ quay.io/pires/docker-logstash-forwarder:0.4
The following command will clone
logstash-forwarder repo, build
logstash-forwarder and copy the resulting binary to
ATTENTION: The images currently available have support for multiple certificates in the SSL CA chain. This is not supported by the aforementioned build script.
Now, you just need to rebuild the image.
SSL self-signed certificates
bundle ca certificate(which must include
root ca certificate)
openssl req -x509 -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt
Be sure to set a
CN that corresponds to a hostname resolvable by your hosts.