File tree Expand file tree Collapse file tree 6 files changed +93
-1
lines changed Expand file tree Collapse file tree 6 files changed +93
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ services: docker
3
3
4
4
env :
5
5
- VERSION=5.0
6
+ - VERSION=2.4
6
7
- VERSION=2.3
7
8
- VERSION=2.2
8
9
- VERSION=2.1
Original file line number Diff line number Diff line change
1
+ FROM openjdk:8-jre
2
+
3
+ # grab gosu for easy step-down from root
4
+ ENV GOSU_VERSION 1.7
5
+ RUN set -x \
6
+ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
7
+ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
8
+ && export GNUPGHOME="$(mktemp -d)" \
9
+ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
10
+ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
11
+ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
12
+ && chmod +x /usr/local/bin/gosu \
13
+ && gosu nobody true
14
+
15
+ # https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
16
+ # https://packages.elasticsearch.org/GPG-KEY-elasticsearch
17
+ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 46095ACC8548582C1A2699A9D27D666CD88E42B4
18
+
19
+ ENV ELASTICSEARCH_VERSION 2.4.0
20
+ ENV ELASTICSEARCH_REPO_BASE http://packages.elasticsearch.org/elasticsearch/2.x/debian
21
+
22
+ RUN echo "deb $ELASTICSEARCH_REPO_BASE stable main" > /etc/apt/sources.list.d/elasticsearch.list
23
+
24
+ RUN set -x \
25
+ && apt-get update \
26
+ && apt-get install -y --no-install-recommends elasticsearch=$ELASTICSEARCH_VERSION \
27
+ && rm -rf /var/lib/apt/lists/*
28
+
29
+ ENV PATH /usr/share/elasticsearch/bin:$PATH
30
+
31
+ WORKDIR /usr/share/elasticsearch
32
+
33
+ RUN set -ex \
34
+ && for path in \
35
+ ./data \
36
+ ./logs \
37
+ ./config \
38
+ ./config/scripts \
39
+ ; do \
40
+ mkdir -p "$path" ; \
41
+ chown -R elasticsearch:elasticsearch "$path" ; \
42
+ done
43
+
44
+ COPY config ./config
45
+
46
+ VOLUME /usr/share/elasticsearch/data
47
+
48
+ COPY docker-entrypoint.sh /
49
+
50
+ EXPOSE 9200 9300
51
+ ENTRYPOINT ["/docker-entrypoint.sh" ]
52
+ CMD ["elasticsearch" ]
Original file line number Diff line number Diff line change
1
+ network.host : 0.0.0.0
Original file line number Diff line number Diff line change
1
+ # you can override this using by setting a system property, for example -Des.logger.level=DEBUG
2
+ es.logger.level : INFO
3
+ rootLogger : ${es.logger.level}, console
4
+ logger :
5
+ # log action execution errors for easier debugging
6
+ action : DEBUG
7
+ # reduce the logging for aws, too much is logged under the default INFO
8
+ com.amazonaws : WARN
9
+
10
+ appender :
11
+ console :
12
+ type : console
13
+ layout :
14
+ type : consolePattern
15
+ conversionPattern : " [%d{ISO8601}][%-5p][%-25c] %m%n"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # Add elasticsearch as command if needed
6
+ if [ " ${1: 0: 1} " = ' -' ]; then
7
+ set -- elasticsearch " $@ "
8
+ fi
9
+
10
+ # Drop root privileges if we are running elasticsearch
11
+ # allow the container to be started with `--user`
12
+ if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
+ # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
+ chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
15
+
16
+ set -- gosu elasticsearch " $@ "
17
+ # exec gosu elasticsearch "$BASH_SOURCE" "$@"
18
+ fi
19
+
20
+ # As argument is not related to elasticsearch,
21
+ # then assume that user wants to run his own process,
22
+ # for example a `bash` shell to explore this image
23
+ exec " $@ "
Original file line number Diff line number Diff line change 3
3
4
4
declare -A aliases=(
5
5
[1.7]=' 1'
6
- [2.3 ]=' 2 latest'
6
+ [2.4 ]=' 2 latest'
7
7
[5.0]=' 5'
8
8
)
9
9
You can’t perform that action at this time.
0 commit comments