-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (27 loc) · 1.23 KB
/
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
FROM alpine:3.4
MAINTAINER Toon Van Dooren <[email protected]>
ENV JAVA_VERSION 8.92.14-r1
ENV ELASTICSEARCH_VERSION 1.5.2
RUN apk update && apk add tzdata bash tar rsync ca-certificates curl openjdk8-jre-base wget && \
apk upgrade && \
cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime && \
echo "Europe/Brussels" > /etc/timezone && \
mkdir -p /opt && \
mkdir -p /var/lib/elasticsearch \
cd /tmp && \
curl https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz > elasticsearch-$ELASTICSEARCH_VERSION.tar.gz && \
tar -xzf elasticsearch-$ELASTICSEARCH_VERSION.tar.gz && \
rm -rf elasticsearch-$ELASTICSEARCH_VERSION.tar.gz && \
mv elasticsearch-$ELASTICSEARCH_VERSION /opt/elasticsearch && \
rm -fr /tmp/* && \
rm -f /var/cache/apk/*
ADD ./cfg/elasticsearch.yml /opt/elasticsearch/config/elasticsearch.yml
ADD ./scripts/start.sh /scripts/start.sh
RUN chmod -R a+rx /scripts && \
chmod -R a+rwx /opt/ && \
chmod -R a+rwx /var/lib && rm -fr /var/lib/elasticsearch && \
/opt/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-icu/2.5.0 && \
/opt/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-phonetic/2.5.0
EXPOSE 9200
EXPOSE 9300
CMD ["/scripts/start.sh"]