FROM java:7-jre
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)

# Download version 1.4.2 of logstash
RUN cd /tmp && \
    wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz && \
    tar -xzvf ./logstash-1.4.2.tar.gz && \
    mv ./logstash-1.4.2 /opt/logstash && \
    rm ./logstash-1.4.2.tar.gz

# Install contrib plugins
RUN /opt/logstash/bin/plugin install contrib

# Copy build files to container root
RUN mkdir /app
ADD . /app

# Set default data directory
ENV DATA_DIR /data

# Define mountable directory
VOLUME ${DATA_DIR}

# Define working directory
WORKDIR ${DATA_DIR}

# Kibana
EXPOSE 9292

# Start logstash
ENTRYPOINT ["/app/bin/boot"]

# Valid commands: `agent`, `web`, `configtest`
# Default (empty command) runs the ELK stack
CMD []

FROM java:7-jre
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)

# Download version 1.4.2 of logstash
RUN cd /tmp && \
    wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz && \
    tar -xzvf ./logstash-1.4.2.tar.gz && \
    mv ./logstash-1.4.2 /opt/logstash && \
    rm ./logstash-1.4.2.tar.gz

# Install contrib plugins
RUN /opt/logstash/bin/plugin install contrib

# Copy build files to container root
RUN mkdir /app
ADD . /app

# Kibana
EXPOSE 9292

# Start logstash
ENTRYPOINT ["/app/bin/boot"]

# Valid commands: "agent", "web", "configtest"
# Default (empty command): "agent" & "web"
CMD []

Revert "Dockerfile: configurable data volume and workdir"
Revert "Dockerfile: configurable data volume and workdir"

This reverts commit d5219a39b233539f9a2fcea9fe1ac50fa8c3dfd4.
