Skip to content

Instantly share code, notes, and snippets.

@mschoch
Last active December 30, 2015 17:19
Show Gist options
  • Save mschoch/7860490 to your computer and use it in GitHub Desktop.
Save mschoch/7860490 to your computer and use it in GitHub Desktop.
Dockerfile for elasticsearch
FROM mschoch/java
MAINTAINER Marty Schoch "[email protected]"
# install elasticsearch
ADD https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.2.deb /tmp/elasticsearch-1.0.2.deb
RUN RUNLEVEL=1 dpkg -i /tmp/elasticsearch-1.0.2.deb
RUN rm /tmp/elasticsearch-1.0.2.deb
ADD https://gist.githubusercontent.com/mschoch/7880523/raw/32c8a2b05ed30335e5558b78ba0729789190b386/elasticsearch-docker-script /usr/share/elasticsearch/bin/elasticsearch-docker
RUN chmod 755 /usr/share/elasticsearch/bin/elasticsearch-docker
# install the head plugin (minimal UI)
RUN /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head
EXPOSE 9200 9300
VOLUME ["/var/lib/elasticsearch"]
ENV LOG_DIR /var/log/elasticsearch
ENV CONF_DIR /etc/elasticsearch
ENV CONF_FILE $CONF_DIR/elasticsearch.yml
CMD [""]
ENTRYPOINT ["/usr/share/elasticsearch/bin/elasticsearch-docker"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment