docker-minecraft-server/elasticsearch/Dockerfile

40 lines
1.1 KiB
Docker
Raw Normal View History

2017-04-22 01:08:15 +00:00
FROM openjdk:8u121-jre-alpine
2017-05-02 19:29:17 +00:00
LABEL maintainer "itzg"
2016-11-05 01:18:43 +00:00
RUN apk -U add bash
2017-09-25 00:17:38 +00:00
ARG ES_VERSION=5.5.2
# avoid conflicts with debian host systems when mounting to host volume
ARG DEFAULT_ES_USER_UID=1100
2016-11-05 01:18:43 +00:00
ADD https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERSION.tar.gz /tmp
# need to adapt to both Docker's new remote-unpack-ADD behavior and the old behavior
RUN cd /usr/share && \
2017-07-13 14:09:10 +00:00
if [ -f /tmp/elasticsearch-$ES_VERSION.tar.gz ]; then \
tar xf /tmp/elasticsearch-$ES_VERSION.tar.gz; \
else mv /tmp/elasticsearch-${ES_VERSION} /usr/share; \
fi && \
rm -f /tmp/elasticsearch-$ES_VERSION.tar.gz
EXPOSE 9200 9300
2017-02-04 20:37:45 +00:00
HEALTHCHECK --timeout=5s CMD wget -q -O - http://$HOSTNAME:9200/_cat/health
ENV ES_HOME=/usr/share/elasticsearch-$ES_VERSION \
2016-11-05 01:18:43 +00:00
DEFAULT_ES_USER=elasticsearch \
DEFAULT_ES_USER_UID=$DEFAULT_ES_USER_UID \
ES_JAVA_OPTS="-Xms1g -Xmx1g"
2017-07-16 14:09:28 +00:00
RUN adduser -S -s /bin/sh -u $DEFAULT_ES_USER_UID $DEFAULT_ES_USER
VOLUME ["/data","/conf"]
WORKDIR $ES_HOME
2015-10-30 00:58:28 +00:00
COPY java.policy /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
2016-11-05 01:18:43 +00:00
COPY start /start
COPY log4j2.properties $ES_HOME/config/
CMD ["/start"]