Browse Source

Docker Elasticsearch 2.4.6

master
sipp11 7 years ago
commit
44f811d672
  1. 21
      Dockerfile
  2. 4
      docker-entrypoint.sh

21
Dockerfile

@ -0,0 +1,21 @@
FROM java:8
ENV ELASTICSEARCH=2.4.6
# elasticsearch doesn't allow to run as root
RUN useradd user
RUN mkdir -p /data/esdata
RUN mkdir -p /data/log
RUN chown -R user:user /data
WORKDIR /usr/src
COPY elasticsearch-${ELASTICSEARCH} /usr/src/
COPY docker-entrypoint.sh /docker-entrypoint.sh
EXPOSE 9200
EXPOSE 9300
USER user:user
# RUN /usr/src/elasticsearch-2.4.6/bin/elasticsearch
CMD ["/docker-entrypoint.sh"]

4
docker-entrypoint.sh

@ -0,0 +1,4 @@
#!/bin/bash
exec /usr/src/bin/elasticsearch
Loading…
Cancel
Save