-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
30 lines (20 loc) · 984 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM java:8-jre
MAINTAINER Eagle Chen <[email protected]>
ENV ES_VERSION="2.2.1"
ENV GOSU_VERSION="1.8"
# es needs non-root user to start
RUN cd /tmp && curl -OL https://github.com/medcl/elasticsearch-rtf/archive/${ES_VERSION}.zip && \
unzip ${ES_VERSION}.zip -d /usr/share && rm /tmp/${ES_VERSION}.zip && \
mv /usr/share/elasticsearch-rtf-${ES_VERSION} /usr/share/elasticsearch && \
groupadd es && useradd -g es es && \
for path in data config logs config/scripts; do mkdir -p "/usr/share/elasticsearch/$path"; done && \
chown -R es:es /usr/share/elasticsearch && \
curl -o /usr/local/bin/gosu -fsSL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture)" && \
chmod +x /usr/local/bin/gosu
ENV PATH /usr/share/elasticsearch/bin:$PATH
VOLUME /usr/share/elasticsearch/data
VOLUME /usr/share/elasticsearch/logs
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 9200 9300
CMD ["elasticsearch"]