forked from pires/docker-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (32 loc) · 974 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
31
32
33
34
35
36
37
38
39
40
FROM quay.io/pires/docker-jre:8u112
MAINTAINER pjpires@gmail.com
# Export HTTP & Transport
EXPOSE 9200 9300
ENV VERSION 5.0.1
# Install Elasticsearch.
RUN apk add --update bash curl ca-certificates sudo && \
( curl -Lskj https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$VERSION.tar.gz | \
gunzip -c - | tar xf - ) && \
mv /elasticsearch-$VERSION /elasticsearch && \
rm -rf $(find /elasticsearch | egrep "(\.(exe|bat)$)") && \
apk del curl
# Volume for Elasticsearch data
VOLUME ["/data"]
# Copy configuration
COPY config /elasticsearch/config
# Copy run script
COPY run.sh /
# Set environment variables defaults
ENV ES_JAVA_OPTS "-Xms512m -Xmx512m"
ENV CLUSTER_NAME elasticsearch-default
ENV NODE_MASTER true
ENV NODE_DATA true
ENV NODE_INGEST true
ENV HTTP_ENABLE true
ENV NETWORK_HOST _site_
ENV HTTP_CORS_ENABLE true
ENV HTTP_CORS_ALLOW_ORIGIN *
ENV NUMBER_OF_MASTERS 1
ENV NUMBER_OF_SHARDS 1
ENV NUMBER_OF_REPLICAS 0
CMD ["/run.sh"]