diff --git a/logstash-aws/Dockerfile b/logstash-aws/Dockerfile new file mode 100644 index 0000000..52a6141 --- /dev/null +++ b/logstash-aws/Dockerfile @@ -0,0 +1,24 @@ +FROM alpine:3.3 + +MAINTAINER rlister@gmail.com + +ENV LS_VERSION 2.3.1 + +## install logstash and its dependencies +RUN apk add --update bash openjdk7-jre-base openssl curl ca-certificates && \ + cd /tmp && \ + wget -q http://download.elastic.co/logstash/logstash/logstash-${LS_VERSION}.tar.gz && \ + mkdir -p /app && \ + tar zxf /tmp/logstash-${LS_VERSION}.tar.gz -C /app/ && \ + rm -rf /tmp/* /var/cache/apk/* + +WORKDIR /app/logstash-${LS_VERSION} + +## avoid OpenSSL::X509::StoreError in jvm +RUN curl -sOJL http://curl.haxx.se/ca/cacert.pem +ENV SSL_CERT_FILE /app/logstash-${LS_VERSION}/cacert.pem + +## install output plugin for AWS elasticsearch service +RUN bin/logstash-plugin install logstash-output-amazon_es + +ENTRYPOINT [ "bin/logstash" ] \ No newline at end of file diff --git a/logstash-aws/README.md b/logstash-aws/README.md new file mode 100644 index 0000000..033acdd --- /dev/null +++ b/logstash-aws/README.md @@ -0,0 +1,24 @@ +# logstash-aws + +Image based on [Alpine Linux](http://www.alpinelinux.org/) with +logstash and +[AWS logstash output plugin](https://github.com/awslabs/logstash-output-amazon_es), +which will sign output events in order to send to +[AWS Elasticsearch Service](https://aws.amazon.com/elasticsearch-service/). + +The image is intended to be as lightweight as possible, but hey, it's java. + +## Usage + +``` +$ docker pull rlister/logstash-aws:2.3.1 + +$ docker run rlister/logstash-aws:2.3.1 version +logstash 2.3.1 + +$ docker run -it rlister/logstash-aws:2.3.1 -e 'input { stdin { } } output { stdout {} }' +Settings: Default pipeline workers: 2 +Pipeline main started +hello world +2016-04-15T03:31:37.718Z 732122cde820 hello world +``` \ No newline at end of file