Tony Mack | dc98185 | 2016-03-12 14:13:24 +0000 | [diff] [blame^] | 1 | FROM ubuntu:14.04.2 |
| 2 | |
| 3 | ENV LOGSTASH_HOST 66.228.36.77 |
| 4 | |
| 5 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --force-yes \ |
| 6 | git \ |
| 7 | golang \ |
| 8 | supervisor |
| 9 | |
| 10 | RUN git clone git://github.com/elasticsearch/logstash-forwarder.git /tmp/logstash-forwarder |
| 11 | RUN cd /tmp/logstash-forwarder && git checkout v0.4.0 && go build |
| 12 | |
| 13 | RUN mkdir /opt/logstash-forwarder && cp /tmp/logstash-forwarder/logstash-forwarder /opt/logstash-forwarder/logstash-forwarder |
| 14 | |
| 15 | ADD conf/config.json /opt/logstash-forwarder/config.json |
| 16 | ADD conf/supervisord.conf /etc/supervisor/conf.d/logstash-forwarder.conf |
| 17 | ADD run_logstash-forwarder /opt/logstash-forwarder/run_logstash-forwarder |
| 18 | |
| 19 | RUN chmod +x /opt/logstash-forwarder/run_logstash-forwarder |
| 20 | |
| 21 | RUN rm -rf /tmp/* |
| 22 | |
| 23 | VOLUME ["/opt/certs", "/var/log/"] |
| 24 | |
| 25 | CMD /opt/logstash-forwarder/run_logstash-forwarder |
| 26 | |
| 27 | |